Skip to content

MINOR: [C++] Remove misleading comment on FileKeyUnwrapper constructor - #40808

Merged
pitrou merged 1 commit into
apache:mainfrom
adamreeve:unwrapper_comment_fix
Mar 27, 2024
Merged

pitrou merged 1 commit into
apache:mainfrom
adamreeve:unwrapper_comment_fix

Conversation

@adamreeve

Copy link
Copy Markdown
Contributor

Rationale for this change

I added this comment in #34181, but from the discussion in #40732 (comment), I realised this comment was incorrect. The extra overload appears to just be a convenience as a FileKeyMaterialStore is already constructed in KeyToolkit::RotateMasterKeys, but the store isn't actually used by the FileKeyUnwrapper in that method, as only FileKeyUnwrapper::GetDataEncryptionKey is called, which bypasses the store.

RotateMasterKeys does however rely on the temp_key_material_store passed to the FileKeyWrapper being used, which is possibly where this confusion came from.

What changes are included in this PR?

Removes an incorrect statement from a C++ header comment.

Are these changes tested?

NA

Are there any user-facing changes?

No

@pitrou
pitrou merged commit dc2c5c6 into apache:main Mar 27, 2024
@adamreeve
adamreeve deleted the unwrapper_comment_fix branch March 27, 2024 19:51
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit dc2c5c6.

There were 3 benchmark results indicating a performance regression:

The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.

vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
apache#40808)

### Rationale for this change

I added this comment in apache#34181, but from the discussion in apache#40732 (comment), I realised this comment was incorrect. The extra overload appears to just be a convenience as a `FileKeyMaterialStore` is already constructed in `KeyToolkit::RotateMasterKeys`, but the store isn't actually used by the `FileKeyUnwrapper` in that method, as only `FileKeyUnwrapper::GetDataEncryptionKey` is called, which bypasses the store.

`RotateMasterKeys` does however rely on the `temp_key_material_store` passed to the `FileKeyWrapper` being used, which is possibly where this confusion came from.

### What changes are included in this PR?

Removes an incorrect statement from a C++ header comment.

### Are these changes tested?

NA

### Are there any user-facing changes?

No

Authored-by: Adam Reeve <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants