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

ExistenceCacheStore now only evicts based on insert #1203

Conversation

allada
Copy link
Member

@allada allada commented Jul 26, 2024

To protect against a case where the parent layer store has items hot in cache and those items are frequently touched, we would never actually ask the underlying store for the data. This caused a problem because the underlying store might evict our item, then our parent ExistenceCacheStore would never let go of the item causing the node to be required to shutdown to clear it up.

This was a vary rare event, because most items have .get() eventually called on the digest, which refreshes the underlying store object.

closes #1199


This change is Reviewable

Copy link
Member Author

@allada allada left a comment

Choose a reason for hiding this comment

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

+@adam-singer

Reviewable status: 0 of 1 LGTMs obtained, and 0 of 9 files reviewed, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Installation / macos-13, Installation / macos-14, Installation / ubuntu-22.04, Local / ubuntu-22.04, Publish image, Publish nativelink-worker-init, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable (waiting on @adam-singer)

@allada allada force-pushed the fix-existence-cache-to-only-evict-based-on-insert-time branch 3 times, most recently from 86ba193 to 1ae1e9c Compare July 27, 2024 21:21
To protect against a case where the parent layer store has items hot
in cache and those items are frequently touched, we would never
actually ask the underlying store for the data. This caused a problem
because the underlying store might evict our item, then our parent
ExistenceCacheStore would never let go of the item causing the node
to be required to shutdown to clear it up.

This was a vary rare event, because most items have `.get()`
eventually called on the digest, which refreshes the underlying
store object.

closes TraceMachina#1199
Copy link
Member

@adam-singer adam-singer left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: 1 of 1 LGTMs obtained, and all files reviewed, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Installation / macos-13, Installation / macos-14, Installation / ubuntu-22.04, Publish image, Publish nativelink-worker-init, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable

@allada allada force-pushed the fix-existence-cache-to-only-evict-based-on-insert-time branch from 1ae1e9c to 130d10b Compare July 28, 2024 00:51
Copy link
Member Author

@allada allada left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: 1 of 1 LGTMs obtained, and all files reviewed, and pending CI: Remote / large-ubuntu-22.04

@allada allada merged commit 250037f into TraceMachina:main Jul 28, 2024
29 checks passed
@allada allada deleted the fix-existence-cache-to-only-evict-based-on-insert-time branch July 28, 2024 04:50
Copy link
Member

@adam-singer adam-singer left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained, and all files reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility for ExistenceCacheStore to never clearing out items
2 participants