Repository navigation
feat: count a Stream's Retention from its close - #229
Merged
moetemp merged 2 commits intoNov 10, 2026
Merged
Conversation
A Stream that stayed open longer than its Retention lost its first Records. The Retention counts from the close, as a namespace's Retention does, and the safety TTL bounds an idle open Stream.
The first wording took a second read.
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.
This PR counts a Stream's Retention from its close, as a namespace's Retention does.
A Stream that stayed open longer than its Retention lost its first Records. Each append trimmed the
Records older than the Retention, a read hid them, and the log expired one Retention after the last
write. The memory Store now keeps every Record of an open Stream until the Stream expires, which is
the safety TTL after its last write. A closed Stream still expires one Retention after the close.
StreamState::retained_fromhides no Record by its age.trimmedstays for a write that findsthe log gone, as after an eviction.
that a closed one expires one Retention after the close. The new
RawKeys::drop_loglets theStore suite reach the gone-log path, so each Store crate implements it.
The Redis Store's change is temporal-community/sdk-streams#8.
An open Stream also keeps each Producer's dedupe and fence state. No append drops it by age, so a
resend of a silent Producer's last batch gets the first answer, and a lower epoch of the Producer
stays fenced. That change is the follow-up commit 6193d2e on
moe/streams-retention-from-close, which also drops the:producerskey.