-
Notifications
You must be signed in to change notification settings - Fork 36
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: [DynamoDB] Ensure that inflight persistence IDs are not evicted #1269
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, makes sense that we shouldn't evict those that are in fligt
but there is a change in "use last record for each pid" that I don't see why it's needed?
...ojection-dynamodb/src/main/scala/akka/projection/dynamodb/internal/DynamoDBOffsetStore.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...ojection-dynamodb/src/main/scala/akka/projection/dynamodb/internal/DynamoDBOffsetStore.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Peter Vlugter <[email protected]>
If, when recovering a backlog in an at-least-once projection, the range of event timestamps from a slice in a given batch of records to have offsets saved exceeds the offset store's
time-window
, the older events will be immediately evicted; since the inflight records are cleaned based on the state after evicting, this implies that the records for those older events will continue to be considered inflight.If there are no further events for a persistence ID that was immediately evicted, this means a leak in inflight (if there are enough of these situations, the hard limit of 10k records inflight will get breached) eventually resulting in projection failure.
Note that sequence numbers are saved based on the incoming records, so this eviction will not prevent seen sequence numbers from being updated.