You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/09/08 01:30:43 UTC

[GitHub] [rocketmq] yidaimi commented on issue #2286: CONSUME_FROM_TIMESTAMP doesn't work

yidaimi commented on issue #2286:
URL: https://github.com/apache/rocketmq/issues/2286#issuecomment-688567779


   感谢回复。根据您给的链接,我仔细研究了一下。我理解CONSUM_FROM_TIMESTAMP的逻辑是:
   1.先找当前consumergroup在这个queue上的最新offset
   2.如果没找到就去找这个queue当前的最早offset(这个offset就是consumerqueue文件组中最早的那个文件的第一个offset,也就是在磁盘上这个queue中最早的那个offset)
   3.要是以上都没有再去按照timestamp去定位到哪个consumequeue文件,再在这个文件中通过折半查找去定位到匹配的timestamp的offset。
   但是这个逻辑似乎是不是永远都走不到3?因为2的consumequeue文件应该永远都会有的吧?另外,要是没consumequeue文件的话,3也没有意义呀?请问什么情况才能走到3呢?
   
   另外,我看链接中的解决方案也是通过cloneoffset方法,让新的consumergroup从其他consumergroup中把offset拷贝过来。让它最终能走1.
   请问什么时候才能真正走到根据timestamp去查找offset的第3步呢?
   
   谢谢!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org