mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-01 15:47:01 +08:00
[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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user