rdblue commented on code in PR #6811:
URL: https://github.com/apache/iceberg/pull/6811#discussion_r1103853090


##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -481,9 +488,31 @@ public Snapshot currentSnapshot() {
   }
 
   public List<Snapshot> snapshots() {
+    ensureSnapshotsLoaded();
+
     return snapshots;
   }
 
+  private void ensureSnapshotsLoaded() {

Review Comment:
   This should probably be `synchronized` because it is okay to share tables 
across threads.



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