File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
store/src/main/java/org/apache/rocketmq/store/timer Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1840,10 +1840,14 @@ public void flush() throws IOException {
18401840 synchronized (lockWhenFlush ) {
18411841 prepareTimerCheckPoint ();
18421842 timerLog .getMappedFileQueue ().flush (0 );
1843- if (System .currentTimeMillis () - lastSnapshotTime > storeConfig .getTimerWheelSnapshotIntervalMs ()) {
1844- lastSnapshotTime = System .currentTimeMillis ();
1845- timerWheel .backup (timerLog .getMappedFileQueue ().getFlushedWhere ());
1846- timerCheckpoint .flush ();
1843+ if (storeConfig .isTimerWheelSnapshotFlush ()) {
1844+ if (System .currentTimeMillis () - lastSnapshotTime > storeConfig .getTimerWheelSnapshotIntervalMs ()) {
1845+ lastSnapshotTime = System .currentTimeMillis ();
1846+ timerWheel .backup (timerLog .getMappedFileQueue ().getFlushedWhere ());
1847+ timerCheckpoint .flush ();
1848+ }
1849+ } else {
1850+ timerWheel .flush ();
18471851 }
18481852 }
18491853 if (System .currentTimeMillis () - start > storeConfig .getTimerProgressLogIntervalMs ()) {
You can’t perform that action at this time.
0 commit comments