jiamo commented on a change in pull request #15662: URL: https://github.com/apache/flink/pull/15662#discussion_r615724248
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/metrics/ThresholdMeter.java ########## @@ -33,7 +35,11 @@ private final Clock clock; private final double maxEventsPerInterval; private final Duration interval; + + @GuardedBy("this") private final Queue<Long> eventTimestamps; + + @GuardedBy("this") private long eventCount = 0; public ThresholdMeter(double maxEventsPerInterval, Duration interval) { Review comment: The NPE seem happened on eventTimestamps. GuardedBy on eventCount will ok? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org