smaheshwar-pltr commented on code in PR #13225:
URL: https://github.com/apache/iceberg/pull/13225#discussion_r3175544692
##########
core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java:
##########
@@ -245,7 +311,44 @@ private boolean reconcileOnSimpleUpdate(
@Override
public FileIO io() {
- return io;
+ if (tableKeyId == null) {
+ return io;
+ }
+
+ if (encryptingFileIO == null) {
+ encryptingFileIO = EncryptingFileIO.combine(io, encryption());
+ }
+
+ return encryptingFileIO;
+ }
+
+ @Override
+ public EncryptionManager encryption() {
Review Comment:
Thanks for flagging - I'm mirroring here what we did for Hive
https://github.com/apache/iceberg/blob/53f1f1a0a7fbdb013676358e8198f2cbd88ef296/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java#L141
cc @ggershinsky. And I think this is fine as I believe that
`TableOperations` are inherently not thread-safe:
E.g. `BaseMetastoreTableOperations` has unsynchronized mutable fields e.g.
`currentMetadata`
https://github.com/apache/iceberg/blob/53f1f1a0a7fbdb013676358e8198f2cbd88ef296/core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java#L54
and this very RESTTableOperations class too similarly:
https://github.com/apache/iceberg/blob/53f1f1a0a7fbdb013676358e8198f2cbd88ef296/core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java#L65
I don't think concurrent use of a single table operations class is
supported. LMKWYT!
--
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]