Skip to content

GH-46217: [C++] Update the timestamp of parquet::encryption::TwoLevelCacheWithExpiration correctly #46283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kapoisu
Copy link

@kapoisu kapoisu commented May 1, 2025

Rationale for this change

Fix the bug mentioned in #46217 (comment)

What changes are included in this PR?

  • Fix the logic of timestamp modification.
  • Extend the test in two_level_cache_with_expiration_test.cc (CleanupPeriodOk).
  • Replace the usage of std::make_unique's constructor with std::make_unique().

Are these changes tested?

Yes. The original test didn't expose the problem because CheckCacheForExpiredTokens was only called once.

Are there any user-facing changes?

No.

@kapoisu kapoisu requested a review from wgtmac as a code owner May 1, 2025 17:19
@kapoisu kapoisu changed the title GH-46217: Update the timestamp of parquet::encryption::TwoLevelCacheWithExpiration correctly GH-46217: [C++] Update the timestamp of parquet::encryption::TwoLevelCacheWithExpiration correctly May 1, 2025
@github-actions github-actions bot added the awaiting review Awaiting review label May 1, 2025
Copy link

github-actions bot commented May 1, 2025

⚠️ GitHub issue #46217 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels May 2, 2025
@kapoisu
Copy link
Author

kapoisu commented May 2, 2025

I'll try to see if I can fix the error during CI. It seems similar to #46203.

kapoisu and others added 4 commits May 6, 2025 05:39
Co-authored-by: Sutou Kouhei <[email protected]>
* RemoveExpiredEntriesFromCache didn't update the timestamp while it
  should. If it did, it would literally be CheckCacheForExpiredTokens(0.0).
  I've added a default value to CheckCacheForExpiredTokens to make it
  more natural and removed RemoveExpiredEntriesFromCache.
* Update the call sites accordingly.
@kapoisu
Copy link
Author

kapoisu commented May 6, 2025

The mismatch of schemas during integration tests seems related to #46087. Since the issue was closed a few days ago (via #46110), I rebased my branch to see if the previously failed tests would pass now.

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.

3 participants