Skip to content

Commit 23f403a

Browse files
authored
fix: Negative finishCpu causes stats reporting to fail (#26587)
Summary: finishCpu += operator.getFinishCpu().roundTo(NANOSECONDS); getFinishCpu has underlying issue that causes finisheCpu to overflow thus resulting in a negative result. This causes exception while reporting query completion event leading to stats not being reported. Fix it by setting finishCpu to max value when it overflows # Release Note ``` == NO RELEASE NOTE == ```
1 parent 0e12d41 commit 23f403a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

presto-main-base/src/main/java/com/facebook/presto/operator/OperatorStats.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,9 @@ else if (info != null && info.getClass() == base.getClass()) {
885885
nullJoinProbeKeyCount += operator.getNullJoinProbeKeyCount();
886886
joinProbeKeyCount += operator.getJoinProbeKeyCount();
887887
}
888-
888+
if (finishCpu < 0) {
889+
finishCpu = Long.MAX_VALUE;
890+
}
889891
return Optional.of(new OperatorStats(
890892
stageId,
891893
stageExecutionId,

0 commit comments

Comments
 (0)