EnricoMi commented on code in PR #44990: URL: https://github.com/apache/arrow/pull/44990#discussion_r1923313262
########## cpp/src/parquet/encryption/internal_file_decryptor.cc: ########## @@ -147,13 +141,10 @@ std::shared_ptr<Decryptor> InternalFileDecryptor::GetFooterDecryptor( std::shared_ptr<encryption::AesDecryptor> aes_metadata_decryptor; std::shared_ptr<encryption::AesDecryptor> aes_data_decryptor; - { - std::lock_guard<std::mutex> lock(mutex_); - aes_metadata_decryptor = encryption::AesDecryptor::Make( - algorithm_, key_len, /*metadata=*/true, &all_decryptors_); - aes_data_decryptor = encryption::AesDecryptor::Make( - algorithm_, key_len, /*metadata=*/false, &all_decryptors_); - } + aes_metadata_decryptor = + encryption::AesDecryptor::Make(algorithm_, key_len, /*metadata=*/true); + aes_data_decryptor = + encryption::AesDecryptor::Make(algorithm_, key_len, /*metadata=*/false); Review Comment: Done! Removed code duplication of `GetFooterKey` and replaced caching of `aes_metadata_decryptor` and `aes_data_decryptor` with caching `footer_key`. Cached `footer_key` gets wiped out on `WipeOutDecryptionKeys`. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org