File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -9796,9 +9796,7 @@ MySQL 支持 ACID 特性,保证可靠性和持久性,读取性能不高,
97969796* 灵活的数据模型,设计了一些数据存储格式,能保证效率上的提高
97979797* 高可用,集群
97989798
9799- 常见的 Nosql:Redis、memcache、HBase、MongoDB
9800-
9801- ![ ] ( https://seazean.oss-cn-beijing.aliyuncs.com/img/DB/电商场景解决方案.png )
9799+ 常见的 NoSQL:Redis、memcache、HBase、MongoDB
98029800
98039801
98049802
Original file line number Diff line number Diff line change @@ -6915,7 +6915,7 @@ HAClient 是 slave 端运行的代码,用于**和 master 服务器建立长连
69156915
69166916 * `if (diff >= (msgHeaderSize + bodySize))`:说明** 缓冲区内是包含当前帧的全部数据的** ,开始处理帧数据
69176917
6918- `HAService . . . appendToCommitLog(masterPhyOffset, bodyData)`:** 存储数据到 CommitLog **
6918+ `HAService . . . appendToCommitLog(masterPhyOffset, bodyData)`:** 存储数据到 CommitLog ** ,并构建 Index 和 CQ
69196919
69206920 `this . byteBufferRead. position(readSocketPos)`:恢复 byteBufferRead 的 pos 指针
69216921
@@ -7386,7 +7386,7 @@ AllocateMappedFileService **创建 MappedFile 服务**
73867386
73877387ReputMessageService 消息分发服务,用于构** 建 ConsumerQueue 和 IndexFile 文件**
73887388
7389- * run():循环执行 doReput 方法,每执行一次线程休眠 1 毫秒
7389+ * run():** 循环执行 doReput 方法** ,所以发送的消息存储进 CL 就可以产生对应的 CQ ,每执行一次线程休眠 1 毫秒
73907390
73917391 ```java
73927392 public void run()
Original file line number Diff line number Diff line change @@ -1498,7 +1498,7 @@ public class Blog {
14981498
14991499缓存类别:
15001500
1501- * 一级缓存:SqlSession 级别的缓存,又叫本地会话缓存,自带的(不需要配置),一级缓存的生命周期与 SqlSession 一致。在操作数据库时需要构造 SqlSession 对象,在对象中有一个数据结构(HashMap)用于存储缓存数据,不同的 SqlSession 之间的缓存数据区域是互相不影响的
1501+ * 一级缓存:SqlSession 级别的缓存,又叫本地会话缓存,自带的(不需要配置),一级缓存的生命周期与 SqlSession 一致。在操作数据库时需要构造 SqlSession 对象,** 在对象中有一个数据结构(HashMap)用于存储缓存数据** ,不同的 SqlSession 之间的缓存数据区域是互相不影响的
15021502* 二级缓存:mapper(namespace)级别的缓存,二级缓存的使用,需要手动开启(需要配置)。多个 SqlSession 去操作同一个 Mapper 的 SQL 可以共用二级缓存,二级缓存是跨 SqlSession 的
15031503
15041504开启缓存:配置核心配置文件中 <settings> 标签
You can’t perform that action at this time.
0 commit comments