[ISSUE #10079] FlushConsumeQueueService: always flush store checkpoint after CQ flush (#10080)

Change-Id: I57c0922bb81c2d43359867e82a92fdf2deab7ad7

Co-authored-by: guyinyou <guyinyou.gyy@alibaba-inc.com>
This commit is contained in:
guyinyou
2026-02-09 17:38:03 +08:00
committed by GitHub
parent 1754cece4b
commit c197e50f8d
@@ -651,14 +651,12 @@ public class ConsumeQueueStore extends AbstractConsumeQueueStore {
logicsMsgTimestamp = messageStore.getStoreCheckpoint().getTmpLogicsMsgTimestamp();
}
boolean flushOK = true;
for (ConcurrentMap<Integer, ConsumeQueueInterface> maps : consumeQueueTable.values()) {
for (ConsumeQueueInterface cq : maps.values()) {
boolean result = false;
for (int i = 0; i < retryTimes && !result; i++) {
result = flush(cq, flushConsumeQueueLeastPages);
}
flushOK &= result;
}
}
@@ -666,7 +664,7 @@ public class ConsumeQueueStore extends AbstractConsumeQueueStore {
messageStore.getCompactionStore().flush(flushConsumeQueueLeastPages);
}
if (flushOK && 0 == flushConsumeQueueLeastPages) {
if (0 == flushConsumeQueueLeastPages) {
if (logicsMsgTimestamp > 0) {
messageStore.getStoreCheckpoint().setLogicsMsgTimestamp(logicsMsgTimestamp);
}