majialoong commented on code in PR #11534:
URL: https://github.com/apache/rocketmq/pull/11534#discussion_r4674974876


##########
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:
   nit: `snapOffset` is unused here, maybe we can remove it.
   
   ```suggestion
                   LOGGER.info("not found timerWheel snapshot, recover from 
base + checkpoint");
   ```



-- 
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]

Reply via email to