You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2021/07/03 09:56:18 UTC

[iotdb] branch fix_null_pointer_in_cluster created (now efe70c0)

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

qiaojialin pushed a change to branch fix_null_pointer_in_cluster
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at efe70c0  fix take byte array null pointer in PlanSerializer

This branch includes the following new commits:

     new efe70c0  fix take byte array null pointer in PlanSerializer

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: fix take byte array null pointer in PlanSerializer

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit efe70c0c3363fb4be04f48532891186eb53f2c69
Author: qiaojialin <64...@qq.com>
AuthorDate: Sat Jul 3 17:55:46 2021 +0800

    fix take byte array null pointer in PlanSerializer
---
 .../main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java b/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java
index 71b3136..78200f0 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/utils/PlanSerializer.java
@@ -35,7 +35,13 @@ public class PlanSerializer {
   }
 
   public byte[] serialize(PhysicalPlan plan) throws IOException {
-    ByteArrayOutputStream poll = baosBlockingDeque.poll();
+    ByteArrayOutputStream poll;
+    try {
+      poll = baosBlockingDeque.take();
+    } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
+      throw new IOException("take byte array output stream interrupted", e);
+    }
     poll.reset();
 
     try (DataOutputStream dataOutputStream = new DataOutputStream(poll)) {