siddharthteotia commented on code in PR #10171:
URL: https://github.com/apache/pinot/pull/10171#discussion_r1092330727


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/LoopUtils.java:
##########
@@ -29,10 +28,9 @@ private LoopUtils() {
   public static final int MAX_ENTRIES_KEYS_MERGED_PER_INTERRUPTION_CHECK_MASK 
= 0b1_1111_1111_1111;
 
   // Check for thread interruption, every time after merging 8192 keys
-  public static void checkMergePhaseInterruption(int mergedKeys) {
-    if ((mergedKeys & MAX_ENTRIES_KEYS_MERGED_PER_INTERRUPTION_CHECK_MASK) == 0
-        && Tracing.ThreadAccountantOps.isInterrupted()) {
-      throw new EarlyTerminationException("Interrupted while merging records");
+  public static void sampleAndCheckInterruptionPeriodically(int mergedKeys) {

Review Comment:
   my suggestion would be to keep this in `ThreadAccountantOps` similar to 
`sampleAndCheckInterruption()` method to keep all related code together unless 
you see this particular class evolving into something different ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to