Skip to content

Conversation

@kapoisu
Copy link
Contributor

@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
@github-actions
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
Contributor 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
Copy link
Contributor 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.

@wgtmac wgtmac changed the title GH-46217: [C++] Update the timestamp of parquet::encryption::TwoLevelCacheWithExpiration correctly GH-46217: [C++][Parquet] Update the timestamp of parquet::encryption::TwoLevelCacheWithExpiration correctly May 6, 2025
@pitrou
Copy link
Member

pitrou commented Jun 5, 2025

I've rebased on git main and will merge if CI is ok.

kapoisu and others added 4 commits July 1, 2025 16:42
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
* 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.
@pitrou pitrou merged commit eda9942 into apache:main Jul 1, 2025
32 of 33 checks passed
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Jul 1, 2025
@pitrou
Copy link
Member

pitrou commented Jul 1, 2025

@kapoisu Sorry for forgetting about this! I rebased again and then merged. Thank you for your contribution!

@conbench-apache-arrow
Copy link

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

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

@kapoisu kapoisu deleted the GH-46217 branch July 2, 2025 20:40
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.

5 participants