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

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


The following commit(s) were added to refs/heads/master by this push:
     new 37dae90  add setNoMoreTsBlocks(), close() and abort() methods in 
SinkHandle interface (#5256)
37dae90 is described below

commit 37dae9011d3d881beea95b7aed2308c0a517ed99
Author: Jackie Tien <[email protected]>
AuthorDate: Wed Mar 16 21:01:04 2022 +0800

    add setNoMoreTsBlocks(), close() and abort() methods in SinkHandle 
interface (#5256)
---
 .../org/apache/iotdb/db/mpp/buffer/SinkHandle.java  | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/buffer/SinkHandle.java 
b/server/src/main/java/org/apache/iotdb/db/mpp/buffer/SinkHandle.java
index e80550f..0c78196 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/buffer/SinkHandle.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/buffer/SinkHandle.java
@@ -28,14 +28,29 @@ public interface SinkHandle {
   ListenableFuture<Void> isFull();
 
   /**
-   * Sends a tsBlock to an unpartitioned buffer. If no-more-pages has been 
set, the send tsBlock
+   * Sends a tsBlock to an unpartitioned buffer. If no-more-tsBlocks has been 
set, the send tsBlock
    * call is ignored. This can happen with limit queries.
    */
   void send(ByteBuffer tsBlock);
 
   /**
-   * Sends a tsBlock to a specific partition. If no-more-pages has been set, 
the send tsBlock call
-   * is ignored. This can happen with limit queries.
+   * Sends a tsBlock to a specific partition. If no-more-tsBlocks has been 
set, the send tsBlock
+   * call is ignored. This can happen with limit queries.
    */
   void send(int partition, ByteBuffer tsBlock);
+
+  /**
+   * Notify SinkHandle that no more tsBlocks will be sent. Any future calls to 
send a tsBlock are
+   * ignored.
+   */
+  void setNoMoreTsBlocks();
+
+  /** close the sink handle, discarding all tsBlocks which may still in memory 
buffer. */
+  void close();
+
+  /**
+   * Abort the sink handle, discarding all tsBlocks which may still in memory 
buffer, but blocking
+   * readers. It is expected that readers will be unblocked when the failed 
query is cleaned up.
+   */
+  void abort();
 }

Reply via email to