przemekd commented on code in PR #9029:
URL: https://github.com/apache/iceberg/pull/9029#discussion_r1401297380


##########
core/src/main/java/org/apache/iceberg/SerializableTable.java:
##########
@@ -237,7 +236,14 @@ public EncryptionManager encryption() {
 
   @Override
   public LocationProvider locationProvider() {
-    return locationProvider;
+    if (lazyLocationProvider == null) {
+      synchronized (this) {
+        if (lazyLocationProvider == null) {
+          lazyLocationProvider = LocationProviders.locationsFor(location, 
properties);

Review Comment:
   Makes sense. Change applied 👍🏻 



##########
core/src/main/java/org/apache/iceberg/SerializableTable.java:
##########
@@ -237,7 +236,14 @@ public EncryptionManager encryption() {
 
   @Override
   public LocationProvider locationProvider() {
-    return locationProvider;
+    if (lazyLocationProvider == null) {
+      synchronized (this) {
+        if (lazyLocationProvider == null) {
+          lazyLocationProvider = LocationProviders.locationsFor(location, 
properties);

Review Comment:
   Makes sense. Change applied 👍🏻 



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to