You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ne...@apache.org on 2021/11/16 00:45:16 UTC

[pinot] branch master updated: Check interrupt flag in acquire (#7769)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new d1606cd  Check interrupt flag in acquire (#7769)
d1606cd is described below

commit d1606cd0f3877c1a8ec08255d003ef104a94c500
Author: Neha Pawar <ne...@gmail.com>
AuthorDate: Mon Nov 15 16:44:48 2021 -0800

    Check interrupt flag in acquire (#7769)
    
    * Check interrupt flag in acquire
    
    * Clear flag
---
 .../pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java b/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java
index 160c3ca..14769ca 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java
@@ -23,6 +23,7 @@ import org.apache.pinot.core.operator.blocks.IntermediateResultsBlock;
 import org.apache.pinot.core.plan.PlanNode;
 import org.apache.pinot.segment.spi.FetchContext;
 import org.apache.pinot.segment.spi.IndexSegment;
+import org.apache.pinot.spi.exception.EarlyTerminationException;
 
 
 /**
@@ -64,6 +65,10 @@ public class AcquireReleaseColumnsSegmentOperator extends BaseOperator<Intermedi
    * Acquires the indexSegment using the provided fetchContext
    */
   public void acquire() {
+    // do not acquire if interrupted (similar to the check inside the nextBlock())
+    if (Thread.interrupted()) {
+      throw new EarlyTerminationException();
+    }
     _indexSegment.acquire(_fetchContext);
   }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org