You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/12/18 03:53:03 UTC

[iotdb] branch lmh/fixIntoSonar created (now a517c462ed)

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

hui pushed a change to branch lmh/fixIntoSonar
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at a517c462ed fix

This branch includes the following new commits:

     new a517c462ed fix

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

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

hui pushed a commit to branch lmh/fixIntoSonar
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit a517c462ed1e360bc71a52424531c921c3807d2e
Author: Minghui Liu <li...@foxmail.com>
AuthorDate: Sun Dec 18 11:44:21 2022 +0800

    fix
---
 .../mpp/execution/operator/process/AbstractIntoOperator.java  | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
index 5f4b8dda34..a975c9608d 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
@@ -130,9 +130,7 @@ public abstract class AbstractIntoOperator implements ProcessOperator {
 
   @Override
   public TsBlock next() {
-    if (!checkLastWriteOperation()) {
-      return null;
-    }
+    checkLastWriteOperation();
 
     if (!processTsBlock(cachedTsBlock)) {
       return null;
@@ -153,12 +151,10 @@ public abstract class AbstractIntoOperator implements ProcessOperator {
   /**
    * Check whether the last write operation was executed successfully, and throw an exception if the
    * execution failed, otherwise continue to execute the operator.
-   *
-   * @return true if the last write operation has been executed successfully.
    */
-  private boolean checkLastWriteOperation() {
+  private void checkLastWriteOperation() {
     if (writeOperationFuture == null) {
-      return true;
+      return;
     }
 
     try {
@@ -182,7 +178,6 @@ public abstract class AbstractIntoOperator implements ProcessOperator {
       }
 
       writeOperationFuture = null;
-      return true;
     } catch (InterruptedException e) {
       LOGGER.warn(
           "{}: interrupted when processing write operation future with exception {}", this, e);