Remove unnecessary locking in SqlStageExecution
The lock on getTotalCputime causes contention for periodic CPU updates
for InternalResourceGroupManager. The method does not access any variables
that need to be guarded by the intrinsic lock.
Cherry-pick of
@@ -328,7 +328,7 @@ public final class SqlStageExecution
return stateMachine.getTotalMemoryReservation();
}
- public synchronized Duration getTotalCpuTime()
+ public Duration getTotalCpuTime()
{
long millis = getAllTasks().stream()
.mapToLong(task -> NANOSECONDS.toMillis(task.getTaskInfo().getStats().getTotalCpuTimeInNanos()))
