Skip to content
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

fix: handle race condition on cache retention #569

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

Commits on Aug 8, 2024

  1. fix: handle cached file delete where path does not exist

    While testing flakiness of disk-based cache delete metrics, it was found that eviction may happen from different reasons and the path may already be deleted.
    To avoid a runtime exception (that is anyway shallowed by listener execution), this PR introduces some validation before checking size.
    jeqo committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    aea3ec7 View commit details
    Browse the repository at this point in the history
  2. fix: add retention-based eviction to disk-based cache metrics test

    To reduce flakiness where deletion is not executed in a consistent manner based on size, a time-based eviction configuration is added to have either 1 or 2 deletions happening while test is running to validate results.
    
    Before it was only checking either first or second value where deleted. Now it is checking 1 or 2 or both.
    
    To validated flakiness, @RepeatedTest(100000) was used, and it's now passing fine.
    jeqo committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    615a0af View commit details
    Browse the repository at this point in the history
  3. fix: add retention-based eviction to memory-based cache metrics test

    Similar to disk-based test, as deletion is not happening consistently leading to flakiness, this commit includes time-based retention to force deletion and validate metrics.
    jeqo committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    01deb75 View commit details
    Browse the repository at this point in the history