We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
macos/centos
develop
1.8
When pop consumption based on rocksdb is enabled, retries of revive process are not executed in backoff pattern as expected.
org.apache.rocketmq.broker.pop.PopConsumerServiceTest
@Test public void test() { Mockito.when(brokerController.getEscapeBridge()).thenReturn(Mockito.mock(EscapeBridge.class)); PopConsumerService consumerServiceSpy = Mockito.spy(consumerService); consumerService.getPopConsumerStore().start(); long popTime = 1000000000L; long invisibleTime = 60 * 1000L; PopConsumerRecord record = new PopConsumerRecord(); record.setPopTime(popTime); record.setInvisibleTime(invisibleTime); record.setTopicId("topic"); record.setGroupId("group"); record.setQueueId(0); record.setOffset(0); consumerService.getPopConsumerStore().writeRecords(Collections.singletonList(record)); Mockito.doReturn(CompletableFuture.completedFuture(Triple.of(Mockito.mock(MessageExt.class), "", false))) .when(consumerServiceSpy).getMessageAsync(any(PopConsumerRecord.class)); Mockito.when(brokerController.getEscapeBridge().putMessageToSpecificQueue(any(MessageExtBrokerInner.class))).thenReturn( new PutMessageResult(PutMessageStatus.UNKNOWN_ERROR, new AppendMessageResult(AppendMessageStatus.UNKNOWN_ERROR)) ); long visibleTimestamp = popTime + invisibleTime; // revive fails Assert.assertEquals(1, consumerServiceSpy.revive(visibleTimestamp, 1)); // should be invisible now Assert.assertEquals(0, consumerService.getPopConsumerStore().scanExpiredRecords(visibleTimestamp, 1).size()); // will be visible again in 10 seconds Assert.assertEquals(1, consumerService.getPopConsumerStore().scanExpiredRecords(visibleTimestamp + 10 * 1000, 1).size()); consumerService.shutdown(); }
Retry in backoff pattern.
Retry immediately.
No response
The text was updated successfully, but these errors were encountered:
[ISSUE #9106] Fix revive backoff retry not effective in Pop Consumpti…
2538c34
…on based on rocksdb (#9107)
Successfully merging a pull request may close this issue.
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
macos/centos
RocketMQ version
develop
JDK Version
1.8
Describe the Bug
When pop consumption based on rocksdb is enabled, retries of revive process are not executed in backoff pattern as expected.
Steps to Reproduce
org.apache.rocketmq.broker.pop.PopConsumerServiceTest
What Did You Expect to See?
Retry in backoff pattern.
What Did You See Instead?
Retry immediately.
Additional Context
No response
The text was updated successfully, but these errors were encountered: