adamreeve commented on code in PR #44990:
URL: https://github.com/apache/arrow/pull/44990#discussion_r1885869068
##########
cpp/src/parquet/column_reader.cc:
##########
@@ -307,8 +307,15 @@ class SerializedPageReader : public PageReader {
// Please refer to the encryption specification for more details:
//
https://github.com/apache/parquet-format/blob/encryption/Encryption.md#44-additional-authenticated-data
- // The ordinal fields in the context below are used for AAD suffix
calculation.
+ // The CryptoContext used by this PageReader.
CryptoContext crypto_ctx_;
+ // This PageReader has its own copy of crypto_ctx_->meta_decryptor and
+ // crypto_ctx_->data_decryptor in order to be thread-safe. Do not mutate
(update) the
+ // instances of crypto_ctx_.
Review Comment:
But the decryptor returned by `GetColumnMetaDecryptor` might be the
`InternalFileDecryptor::footer_metadata_decryptor_` member in the case of
uniform encryption, so although it's only used once, trying to use this method
concurrently for different columns would risk race conditions where the AAD
might be updated in another thread between being updated and used.
--
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]