diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistry.java b/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistry.java index c333c26085fdb..c17fdb40735ff 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistry.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistry.java @@ -326,7 +326,7 @@ private static final class MetricRegistryThreadFactory implements ThreadFactory } public Thread newThread(Runnable r) { - Thread t = new Thread(group, r, "Flink-MetricRegistry-" + threadNumber.incrementAndGet(), 0); + Thread t = new Thread(group, r, "Flink-MetricRegistry-" + threadNumber.getAndIncrement(), 0); if (t.isDaemon()) { t.setDaemon(false); }