Skip to content

Commit adc8da4

Browse files
committed
[SPARK-52559] Synchronize SparkOperatorConfManager.getValue
1 parent 35214b0 commit adc8da4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spark-operator/src/main/java/org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ protected SparkOperatorConfManager() {
6060
}
6161

6262
public String getValue(String key) {
63-
String currentValue = configOverrides.getProperty(key);
64-
return StringUtils.isEmpty(currentValue) ? getInitialValue(key) : currentValue;
63+
synchronized (this) {
64+
String currentValue = configOverrides.getProperty(key);
65+
return StringUtils.isEmpty(currentValue) ? getInitialValue(key) : currentValue;
66+
}
6567
}
6668

6769
public String getInitialValue(String key) {

0 commit comments

Comments
 (0)