do_get: use TTL map to store task state - #108
Merged
Merged
Conversation
jayshrivastava
force-pushed
the
js/hook-up-ttl-map-2
branch
3 times, most recently
from
August 24, 2025 17:08
a8015cc to
ed67281
Compare
jayshrivastava
commented
Aug 24, 2025
| pub(super) runtime: Arc<RuntimeEnv>, | ||
| #[allow(clippy::type_complexity)] | ||
| pub(super) stages: DashMap<StageKey, Arc<OnceCell<(SessionState, Arc<ExecutionStage>)>>>, | ||
| pub(super) stages: TTLMap<StageKey, Arc<OnceCell<TaskData>>>, |
Collaborator
Author
There was a problem hiding this comment.
Oncecell must be in an Arc so we can copy the oncecell after it has been initialized without resetting it
jayshrivastava
force-pushed
the
js/hook-up-ttl-map-2
branch
from
August 24, 2025 22:14
ed67281 to
42b4426
Compare
jayshrivastava
marked this pull request as ready for review
August 24, 2025 22:14
jayshrivastava
force-pushed
the
js/hook-up-ttl-map-2
branch
from
August 24, 2025 22:16
42b4426 to
40dbce6
Compare
gabotechs
approved these changes
Aug 25, 2025
gabotechs
left a comment
Collaborator
There was a problem hiding this comment.
Nice! just some minor comments, +1
The remove() method allows explicit deletion of entries from the TTLMap before they expire naturally.
The do_get call now evicts task state from the map after N calls where N is the number of partitions. This is an approximation because we don't track that unique partition ids are used, so we might evict early in case of retries. The TTLMap will also GC orphaned task state after the configured TTL period.
jayshrivastava
force-pushed
the
js/hook-up-ttl-map-2
branch
from
August 25, 2025 21:47
40dbce6 to
0a5778e
Compare
Collaborator
Author
|
TYFR! |
Collaborator
Author
|
Closes #90 |
2 tasks
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.
ttl_map: add remove() method and tests
The remove() method allows explicit deletion of entries from the TTLMap before they expire naturally.
do_get: use TTL map to store task state
The do_get call now evicts task state from the map after N calls where N
is the number of partitions. This is an approximation because we don't
track that unique partition ids are used, so we might evict early in case
of retries.
The TTLMap will also GC orphaned task state after the configured TTL period.