bxfjb
bxfjb
> Can you submit a pr to fix it @bxfjb Here is the pr, writing unittest is more complicate than I thought :) https://github.com/apache/rocketmq/pull/7901
> Since the consumption progress is synchronized every 10 seconds, if this mechanism does not change, in theory, repeated consumption will occur as long as a master-slave switch occurs. A...
> when the master switches,We also encountered the same problem of repeated consumption,Is there other method to avoid this issue before patch become merged Nothing usable yet, you may merge...
> 当前分级存储对主备模式和 DLedger 的支持不够完善,非常欢迎你把他作为新的特性来贡献。从设计方案上来说,并不只是 schedule 任务判断一下即可,metadata store 中元数据的同步,以及 broker container 模式下的截断等问题都是需要考虑和讨论的,从目前的 pr 来看考虑不够完善。 是的,这个 pr 原本只是打算让分级存储能够在主从/ DLedger 模式下跑起来,后续我计划更新主从同步等部分逻辑
> 当前分级存储对主备模式和 DLedger 的支持不够完善,非常欢迎你把他作为新的特性来贡献。从设计方案上来说,并不只是 schedule 任务判断一下即可,metadata store 中元数据的同步,以及 broker container 模式下的截断等问题都是需要考虑和讨论的,从目前的 pr 来看考虑不够完善。 hello,最近在考虑 IndexFile 的主从同步问题,发现如果使用对象存储作为冷存,根据现有逻辑,如果发生切主,由于从节点无法获得未上传的 IndexFile 中消息所指向的冷存中的消费位点,Sealed 与 Unsealed 部分的数据似乎会永久丢失掉,这个问题有什么解决思路吗 目前可以想到的折中方案包括:将 DispatchRequest 攒批同步到从节点,从节点自行构建本地 IndexFile,切为主节点后再做上传;但这个方案问题在于同步过程容易出现 gap,可以预见到切主过程中这段时间的消息将不能通过 IndexFile 查询到
> 分析的很具体,依次回复几个问题: > > 1. 对于冷存储中的 CommitLog 可以从 0 开始,而 cq 必须与本地位点对齐,只能在 dispatch 时才能确定初始化的位点,因此不会在 factory 中初始化指定,这一点也是为了保证与旧存储格式的兼容。 > 2. fileSegment.getMaxTimestamp() != Long.MAX_VALUE 这个条件还有一个原因是我发现之前同学实现的旧代码中有缺陷,没有修改 segment metadata 中的 time,导致整个 flatfile 无法过期删除。 > 3....
We may introduce a DirectByteBuffer pool like TransientStorePool or use MappedByteBuffer
> `ByteStreams.toByteArray()` creates large array in memory and is unnecessary. It seems `FileChannel.transferFrom()` with NIO channel would be more efficient for writing streams to a file. Thx for reply, I...
> > > `ByteStreams.toByteArray()` creates large array in memory and is unnecessary. It seems `FileChannel.transferFrom()` with NIO channel would be more efficient for writing streams to a file. > >...
> @bxfjb If you want to extend the size of `writeFileChannel` to make `FileChannel.transferTo()` successful, you may try writing a byte at `position - 1`: > > ```java > writeFileChannel.write(ByteBuffer.wrap(new...