I think backpressure duration should only be computed like this if we're in the `suspendWatermark >= 0 && resumeWatermark >= suspendWatermark` block above. Two reasons:
1. Access to backPressureStartTimeNs must be synchronized, since it's being accessed from multiple threads and it's not a volatile or atomic. 2. If we didn't actually resume anything, then we don't know if backpressure was actually happening (maybe, maybe not) so we shouldn't report a time. In this case, we should return 0. [ Full content available at: https://github.com/apache/incubator-druid/pull/6335 ] This message was relayed via gitbox.apache.org for [email protected]
