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 2021/04/21 01:54:09 UTC
[GitHub] [rocketmq] areyouok commented on issue #2732: possbile LitePullConusmer rebalance bug
areyouok commented on issue #2732:
URL: https://github.com/apache/rocketmq/issues/2732#issuecomment-823716404
I had reproduce the bug in this commit:
https://github.com/areyouok/rocketmq/commit/a54599ec45f2473acb647d2e7b15eb55983607d7
At first, create a topic with only one queue:
```./mqadmin updateTopic -n 127.0.0.1:9876 -t TopicTest -r 1 -w 1 -c DefaultCluster```
then run LitePullConsumerBug, it send two messages, receive one, and the offset is update to consumerOffset.json
The output:
```
RocketMQLog:WARN No appenders could be found for logger (io.netty.util.internal.PlatformDependent0).
RocketMQLog:WARN Please initialize the logger system properly.
SendResult [sendStatus=SEND_OK, msgId=AC1128381E4718B4AAC2691C5DF80000, offsetMsgId=AC11283800002A9F0000000000000C60, messageQueue=MessageQueue [topic=TopicTest, brokerName=broker-a, queueId=0], queueOffset=18]
09:51:07,801 1749887142 get queue
09:51:07,803 1749887142 pull step 1
09:51:08,776 start consumer 2
09:51:09,787 203029914 get queue
09:51:09,787 1749887142 lost queue
09:51:09,788 203029914 pull step 1
09:51:10,790 1749887142 get queue
09:51:10,791 1749887142 pull step 1
09:51:10,808 1749887142 pull step 2
09:51:10,814 submit 1 msgs
09:51:10,815 drop 1 msgs
09:51:12,792 203029914 pull step 2
09:51:13,793 1749887142 pull step 2
SendResult [sendStatus=SEND_OK, msgId=AC1128381E4718B4AAC2691C815A0001, offsetMsgId=AC11283800002A9F0000000000000D10, messageQueue=MessageQueue [topic=TopicTest, brokerName=broker-a, queueId=0], queueOffset=19]
09:51:15,806 submit 1 msgs
receive msg: AC1128381E4718B4AAC2691C815A0001
09:51:15,807 1749887142 pull step 1
09:51:18,807 1749887142 pull step 2
```
The root cause in DefaultLitePullConsumerImpl.PullTaskImpl.run
...
long offset = nextPullOffset(messageQueue);
...
updatePullOffset(messageQueue, pullResult.getNextBeginOffset());
After a ProcessQueue is dropped, but the PullTask is still run. The invalid task will call updatePullOffset.
--
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