diff --git a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/counters/CounterSnapshotsTree.java b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/counters/CounterSnapshotsTree.java index 0f7d990ef931..707a9794296a 100644 --- a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/counters/CounterSnapshotsTree.java +++ b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/counters/CounterSnapshotsTree.java @@ -121,7 +121,9 @@ public boolean equals(Object o) } CounterSnapshotsTree that = (CounterSnapshotsTree) o; synchronized (snapshotsMap) { - return Objects.equals(snapshotsMap, that.snapshotsMap); + synchronized (that.snapshotsMap) { + return Objects.equals(snapshotsMap, that.snapshotsMap); + } } }