davidradl commented on code in PR #26426:
URL: https://github.com/apache/flink/pull/26426#discussion_r2034821789


##########
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java:
##########
@@ -258,12 +270,28 @@ public void addAll(Configuration other, String prefix) {
         bld.append(prefix);
         final int pl = bld.length();
 
-        synchronized (this.confData) {
-            synchronized (other.confData) {
-                for (Map.Entry<String, Object> entry : 
other.confData.entrySet()) {
-                    bld.setLength(pl);
-                    bld.append(entry.getKey());
-                    this.confData.put(bld.toString(), entry.getValue());
+        Object lock1 = this.confData;
+        Object lock2 = other.confData;
+
+        // Ensure consistent lock sequence
+        if (System.identityHashCode(lock1) < System.identityHashCode(lock2)) {
+            synchronized (lock1) {

Review Comment:
   the locking sequence is the other way round in this instance



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to