摘要: InnoDB存储引擎最小存储单位是页,每页大小16KB B+树有根节点和叶子节点:如下图 上面的框中就是根节点,存的是主键值+指针,叶子节点(下面的3个框)中存的是数据。 主键值如果是bigint类型大小则是8个字节,指针在InnoD中大小6个字节,则主键值+索引=8+6=14个字节。 根节点大小= 阅读全文
posted @ 2023-07-06 14:55 龙之谷2019 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 流控规则: 2 3 [ 4 { 5 "resource": "sentinel-resource", 6 "controlBehavior": 0, 7 "count": 1, 8 "grade": 1, 9 "limitApp": "default", 10 "strategy": 0 11 阅读全文
posted @ 2023-07-03 15:37 龙之谷2019 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 当调用DefaultMQPushConsumer的suspend的方法时,会暂停发送从broker中获取消息的命令,此时消息还存在broker(消息队列服务器)的某个队列中, 又因为一个队列只能对应一个消费组内的一个消费者,所以这个队列中的消息只能发送给固定的消费者,导致这个消息一直不会被其他消费者 阅读全文
posted @ 2022-09-14 11:10 龙之谷2019 阅读(637) 评论(0) 推荐(0) 编辑
摘要: ResourcePatternResolver 支持通配符来获取resource下面的文件 Resource[] resources = new PathMatchingResourcePatternResolver().getResources("validator-config/*.xml"); 阅读全文
posted @ 2022-03-01 19:47 龙之谷2019 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1 MQClientInstance 2 3 public void start() throws MQClientException { 4 5 //各种线程的start 6 //NettyRemotingClient实现Netty客户器端功能,接受数据包,在客户器端处理后发送给服务端。 7 th 阅读全文
posted @ 2022-01-01 14:23 龙之谷2019 阅读(159) 评论(0) 推荐(0) 编辑
摘要: RocketMQ的消息发送方式主要含syncSend()同步发送、asyncSend()异步发送、sendOneWay()三种方式,sendOneWay()也是异步发送,区别在于不需等待Broker返回确认, 所以可能会存在信息丢失的状况,但吞吐量更高,具体需根据业务情况选用。 一个队列只会被消费组 阅读全文
posted @ 2021-11-05 18:31 龙之谷2019 阅读(233) 评论(0) 推荐(0) 编辑
摘要: @SpringBootApplication 里面继承了@EnableAutoConfiguration,@EnableAutoConfiguration中又继承了@Import(AutoConfigurationImportSelector.class)springBoot在启动的时候会统一加载把 阅读全文
posted @ 2021-06-22 15:31 龙之谷2019 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 如果消费失败,默认顺延继续重试(从lastOffset) rocketmq 重试: 1、重试机制基于延迟来实现的 2、消费失败后,会把ackIndex设置为-1,并且发送给broker,也就是重新消费 2.1 如果发送ack消息成功,那么重试机制由broker负责,如果发送失败,默认5s后由消费端自 阅读全文
posted @ 2021-06-17 15:32 龙之谷2019 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1 // Process any @Import annotations getImports(sourceClass):获取所有@Import的bean 2 processImports(configClass, sourceClass, getImports(sourceClass), filt 阅读全文
posted @ 2021-06-07 16:12 龙之谷2019 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1 package com.future; 2 3 import java.util.concurrent.*; 4 5 6 public class FDemo { 7 public static final ExecutorService service = Executors.newSingl 阅读全文
posted @ 2021-06-04 17:16 龙之谷2019 阅读(52) 评论(0) 推荐(0) 编辑