davidradl commented on code in PR #26426:
URL: https://github.com/apache/flink/pull/26426#discussion_r2042380803
##########
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java:
##########
@@ -239,9 +239,21 @@ public void addAllToProperties(Properties props) {
}
public void addAll(Configuration other) {
- synchronized (this.confData) {
Review Comment:
Yes I see that is how you have coded it, but objects should always be locked
in the same order. So Object A then Object B should be locked in that order,
irrespective of which thread owns them.
If each thread does its own object first, then thread 1 could lock Object A
, then thread 2 lock Object B, then thread 1 would be locked out of Object B,
and vice versa.
I was thinking if the objects had unique hashes then always do the lower
hash first to ensure the order was the same.
--
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]