fuyou001 commented on code in PR #10519:
URL: https://github.com/apache/rocketmq/pull/10519#discussion_r3433515612
##########
broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:
##########
@@ -517,21 +518,67 @@ public void changeInvisibilityDuration(long popTime, long
invisibleTime, long ch
if (skipWrite) {
log.info("PopConsumerService change invisibility skip, time={}, " +
"groupId={}, topicId={}, queueId={}, offset={}", popTime,
groupId, topicId, queueId, offset);
- } else {
-
this.popConsumerStore.writeRecords(Collections.singletonList(ckRecord));
}
+ List<PopConsumerRecord> ckRecords = skipWrite ?
Collections.emptyList() : Collections.singletonList(ckRecord);
+ List<PopConsumerRecord> ackRecords =
Collections.singletonList(ackRecord);
if (brokerConfig.isEnablePopBufferMerge() && popConsumerCache != null)
{
- if
(popConsumerCache.deleteRecords(Collections.singletonList(ackRecord)).isEmpty())
{
- return;
+ popConsumerCache.writeAndDeleteRecords(ckRecords, ackRecords);
+ } else {
+ this.popConsumerStore.writeAndDeleteRecords(ckRecords, ackRecords);
+ }
+ }
+
+ public void
batchChangeInvisibilityDuration(List<ChangeInvisibleTimeRequestEntry>
changeRecords) {
Review Comment:
changeInvisibilityDuration can call batchChangeInvisibilityDuration
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]