[ISSUE #9721] Fix TimerDequeueGetService thread not exiting after shutdown

- Add isRunningDequeue() check in checkDequeueLatch while loop
- Exit loop immediately when service is stopped to avoid thread blocking
- Ensure moveReadTime is not executed during shutdown process
- Improve system stability and reliability
This commit is contained in:
rongtong
2025-09-21 09:56:23 +08:00
committed by GitHub
parent 8fc57f1468
commit fbe9f733b9
@@ -953,6 +953,11 @@ public class TimerMessageStore {
}
int checkNum = 0;
while (true) {
if (!isRunningDequeue()) {
LOGGER.info("Not Running dequeue, skip checkDequeueLatch for delayedTime:{}", delayedTime);
break;
}
if (dequeuePutQueue.size() > 0
|| !checkStateForGetMessages(AbstractStateService.WAITING)
|| !checkStateForPutMessages(AbstractStateService.WAITING)) {