Concurrent pantsd: Wrap Entry state in an EntryStorage abstraction - #23589
Open
tobni wants to merge 1 commit into
Open
Concurrent pantsd: Wrap Entry state in an EntryStorage abstraction#23589tobni wants to merge 1 commit into
Entry state in an EntryStorage abstraction#23589tobni wants to merge 1 commit into
Conversation
tobni
force-pushed
the
graph/entry-storage-indirection
branch
from
July 30, 2026 10:45
95aa975 to
2244ccb
Compare
tobni
commented
Jul 30, 2026
|
|
||
| impl<N: Node> EntryMutable<N> { | ||
| /// Returns the state for the given Run, if it exists. | ||
| fn state_for_run(&self, _run_id: RunId) -> Option<&EntryState<N>> { |
Contributor
Author
There was a problem hiding this comment.
This is an Option in anticipation of an EntryStorage::PerRun arm, where a Run can have no state. Adding the arm now would be dead code.
Contributor
Author
|
Here's the overview of where this is headed: |
benjyw
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wraps
Entrystate in anEntryStorageindirection and allocatesRunTokens from a per-Entrycounter.#7654 stalled on differing options. Avoiding options in node identities was blocked on #11269, which closed unimplemented after the pivot to call-by-name.
The alternative I propose is to make the graph run-aware. This is already possible at runtime since uncacheable results carry their producing run. This approach needs an
Entryto hold more than one state, keyed byRunIdwhen needed.The proposed change is to make access no longer assumed to reach the single state, and
RunTokens stay unique across states rather than being derived from the one being replaced.This change is currently a pure refactor.