huaxingao commented on code in PR #13066:
URL: https://github.com/apache/iceberg/pull/13066#discussion_r2403595759


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -124,13 +184,37 @@ protected void doRefresh() {
       throw new RuntimeException("Interrupted during refresh", e);
     }
 
+    if (encryptionKeyIdFromHMS != null) {
+      encryptionKeyId = encryptionKeyIdFromHMS; // todo gg
+      encryptionDekLength =
+          (dekLengthFromHMS != null)
+              ? Integer.parseInt(dekLengthFromHMS)
+              : TableProperties.ENCRYPTION_DEK_LENGTH_DEFAULT; // todo gg
+    }
+
     refreshFromMetadataLocation(metadataLocation, metadataRefreshMaxRetries);
+
+    if (encryptionKeyIdFromHMS != null) {
+      checkEncryptionProperties(encryptionKeyIdFromHMS, dekLengthFromHMS);
+      encryptedKeysFromMetadata = current().encryptionKeys();

Review Comment:
   Seems to me EncryptionManager caches the key map at construction and isn’t 
rebuilt/updated when current() changes. doRefresh() assigns 
encryptedKeysFromMetadata = current().encryptionKeys(), but the active manager 
never sees those.



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