jasperjiaguo commented on code in PR #10171:
URL: https://github.com/apache/pinot/pull/10171#discussion_r1092725442
##########
pinot-spi/src/main/java/org/apache/pinot/spi/trace/Tracing.java:
##########
@@ -267,5 +279,20 @@ public static void initializeThreadAccountant(int numPqr,
int numPqw, PinotConfi
public static boolean isInterrupted() {
return Thread.interrupted() ||
Tracing.getThreadAccountant().isAnchorThreadInterrupted();
}
+
+ public static void sampleAndCheckInterruption() {
+ if (isInterrupted()) {
+ throw new EarlyTerminationException("Interrupted while merging
records");
Review Comment:
The one captures this interruption will throw/return with more detailed
information. It's hard for us to derive the execution context here.
--
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]