From 544c123b43de0ec04c813b5acda222a9b2095ccd Mon Sep 17 00:00:00 2001 From: OneSizeFitQuorum Date: Tue, 30 Apr 2024 16:48:23 +0800 Subject: [PATCH] fix Signed-off-by: OneSizeFitQuorum --- .../apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java index d7424f136d774..174ce627f0e8c 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java @@ -357,7 +357,7 @@ public void run() { // we may block here if there is no requests in the queue IndexedConsensusRequest request = pendingEntries.poll(PENDING_REQUEST_TAKING_TIME_OUT_IN_SEC, TimeUnit.SECONDS); - if (request != null) { + if (request != null && !Thread.interrupted()) { bufferedEntries.add(request); // If write pressure is low, we simply sleep a little to reduce the number of RPC if (pendingEntries.size() <= config.getReplication().getMaxLogEntriesNumPerBatch()