You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2023/05/12 02:29:19 UTC

[iotdb] branch native_raft updated: fix interruption handling during dispatching

This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a commit to branch native_raft
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/native_raft by this push:
     new 1ae1886cad8 fix interruption handling during dispatching
1ae1886cad8 is described below

commit 1ae1886cad8052360805baa65fa7e97b0e9a3e79
Author: Tian Jiang <jt...@163.com>
AuthorDate: Fri May 12 10:32:08 2023 +0800

    fix interruption handling during dispatching
---
 .../consensus/natraft/protocol/log/dispatch/DispatcherThread.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/natraft/protocol/log/dispatch/DispatcherThread.java b/consensus/src/main/java/org/apache/iotdb/consensus/natraft/protocol/log/dispatch/DispatcherThread.java
index c37e33eaf86..788c59256ba 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/natraft/protocol/log/dispatch/DispatcherThread.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/natraft/protocol/log/dispatch/DispatcherThread.java
@@ -142,6 +142,8 @@ class DispatcherThread extends DynamicThread {
       if (appendEntryResult != null) {
         handler.onComplete(appendEntryResult);
       }
+    } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
     } catch (Exception e) {
       handler.onError(e);
     }
@@ -168,6 +170,8 @@ class DispatcherThread extends DynamicThread {
       if (appendEntryResult != null) {
         handler.onComplete(appendEntryResult);
       }
+    } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
     } catch (Exception e) {
       handler.onError(e);
     }