wgtmac commented on code in PR #44990:
URL: https://github.com/apache/arrow/pull/44990#discussion_r1953681032


##########
cpp/src/parquet/file_reader.cc:
##########
@@ -314,11 +314,7 @@ class SerializedFile : public ParquetFileReader::Contents {
     }
   }
 
-  void Close() override {
-    if (file_metadata_ && file_metadata_->file_decryptor()) {
-      file_metadata_->file_decryptor()->WipeOutDecryptionKeys();
-    }
-  }

Review Comment:
   Right, `WipeOutDecryptionKeys()` is called in the `~InternalFileDecryptor()` 
so we no longer need to call it from here.
   
   > But I suspect we might see crashes again if we tested with keys set 
explicitly in FileDecryptionProperties.
   
   The root cause is that a single `FileDecryptionProperties` instance may be 
shared by multiple Parquet reader using the same `ReaderProperties`. Should we 
make a copy instead of sharing?



##########
cpp/src/parquet/file_reader.cc:
##########
@@ -314,11 +314,7 @@ class SerializedFile : public ParquetFileReader::Contents {
     }
   }
 
-  void Close() override {
-    if (file_metadata_ && file_metadata_->file_decryptor()) {
-      file_metadata_->file_decryptor()->WipeOutDecryptionKeys();
-    }
-  }

Review Comment:
   Right, `WipeOutDecryptionKeys()` is called in the `~InternalFileDecryptor()` 
so we no longer need to call it from here.
   
   > But I suspect we might see crashes again if we tested with keys set 
explicitly in FileDecryptionProperties.
   
   The root cause is that a single `FileDecryptionProperties` instance may be 
shared by multiple Parquet reader using the same `ReaderProperties`. Should we 
make a copy instead of sharing?



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

Reply via email to