jackye1995 commented on pull request #2520: URL: https://github.com/apache/iceberg/pull/2520#issuecomment-848118807
> The main concern that I have is the ability to use the bulk decryption methods from the manager so planning a scan doesn't necessarily incur repeated RPCs to a key manager I suppose you are describing something similar to what is done for data files like here: https://github.com/apache/iceberg/blob/master/spark/src/main/java/org/apache/iceberg/spark/source/BaseDataReader.java#L74-L75 I wonder if there are any real use cases where this approach actually saves RPC calls to a KMS. Because in the envelope encryption schemes we discussed: 1. if it is a single wrap system, then for each file we need to call KMS once to get a new data encryption key (DEK) based on the same key encryption key (KEK), so we always have N KMS calls for N files. (unless the KMS has a batch DEK generation API, which is not very common as far as I know) 2. if it is a double wrap system, then the first call gets a master encryption key (MEK) to generate a KEK, and all DEKs are generated locally based on that cached KEK. So we always have 1 KMS call for N files. So the number of calls to KMS really depends on the algorithm, not that much on the encryption manager API, unless the KMS allows batch operation or it is a completely different encryption scheme. And the KMS would be embedded in the encryption manager implementation and perform necessary caching of keys behind the scene. With that being said, I completely agree that we should use batch operation whenever possible, I will try to find a best way to update the manifest read and write path to be able to leverage batch operations. I will provide an updated PR tonight, meanwhile please let me know what you think about the comment above. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
