lizhimins commented on code in PR #11534:
URL: https://github.com/apache/rocketmq/pull/11534#discussion_r4695488451
##########
store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:
##########
@@ -178,15 +184,14 @@ public TimerMessageStore(final MessageStore messageStore,
final MessageStoreConf
this.slotsTotal = TIMER_WHEEL_TTL_DAY * DAY_SECS;
String timerWheelPath =
getTimerWheelPath(storeConfig.getStorePathRootDir());
+ this.timerWheelSnapshotMode = storeConfig.isTimerWheelSnapshotFlush();
long snapOffset = -1;
- if (storeConfig.isTimerWheelSnapshotFlush()) {
+ if (this.timerWheelSnapshotMode) {
snapOffset = TimerWheel.getMaxSnapshotFlag(timerWheelPath);
- if (snapOffset > 0) {
- // correct recover offset
- timerCheckpoint.setLastTimerLogFlushPos(snapOffset);
+ if (snapOffset >= 0) {
LOGGER.info("found timerWheel snapshot offset {}", snapOffset);
} else {
- LOGGER.info("not found timerWheel snapshot", snapOffset);
+ LOGGER.info("not found timerWheel snapshot, recover from base
+ checkpoint", snapOffset);
Review Comment:
Good catch — applied in 7166399. The argument was a no-op (no `{}`
placeholder, so slf4j dropped it), and this branch only runs when `snapOffset
== -1`, so it carried no information anyway. Removed.
--
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]