nastra commented on code in PR #18817:
URL: https://github.com/apache/iceberg/pull/18817#discussion_r4565742874
##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -279,11 +274,24 @@ public void deletePrefix(String prefix) {
io(prefix).deletePrefix(prefix);
}
+ /**
+ * Sets the storage credentials for new delegates and for existing delegates
that support storage
+ * credentials.
+ *
+ * <p>Call this method before other threads use this FileIO. A delegate that
another thread
+ * creates during this call can keep the previous credentials.
+ */
@Override
public void setCredentials(List<StorageCredential> credentials) {
Preconditions.checkArgument(credentials != null, "Invalid storage
credentials: null");
// copy credentials into a modifiable collection for Kryo serde
this.storageCredentials = Lists.newArrayList(credentials);
+ // A delegate can refresh its own credentials, so io() does not replace
them with this list.
Review Comment:
AI generated comments are a bit confusing IMO, so let's omit this one here
as well
```suggestion
```
--
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]