danielcweeks commented on code in PR #12881:
URL: https://github.com/apache/iceberg/pull/12881#discussion_r2070455735


##########
gcp/src/main/java/org/apache/iceberg/gcp/gcs/GCSFileIO.java:
##########
@@ -209,25 +180,65 @@ private void initMetrics(Map<String, String> props) {
     }
   }
 
+  private Cache<String, PrefixedStorage> storageCache() {
+    if (null == storageCache) {
+      synchronized (this) {
+        if (null == storageCache) {
+          this.storageCache =
+              Caffeine.newBuilder()

Review Comment:
   Why not put the cache initialization in the constructor as opposed to here?  
We're always going to create the cache even for a single value and the storage 
clients are lazily initialized via the supplier anyway.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to