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

fix: DynamoDB Timestamp validation of previous seqNr #1258

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

patriknw
Copy link
Member

  • base the validaiton time window for the previous sequence number
    on start timestamp and backtracking window

Corresponding to #1246

* base the validaiton time window for the previous sequence number
on start timestamp and backtracking window
// Backtracking will emit missed event again.
timestampOf(pid, seqNr - 1).map {
case Some(previousTimestamp) =>
val before = currentState.latestTimestamp.minus(settings.timeWindow)
Copy link
Member Author

Choose a reason for hiding this comment

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

This latestTimestamp is not good for DynamoDB since each slice may progress more than others.

I don't really expect this to happen often with DynamoDB since we don't delete offsets in same way, but if we keep the check it's better that it's the same as in r2dbc.

@patriknw patriknw force-pushed the wip-timestamp-validation2-patriknw branch from 3180251 to af8744c Compare November 20, 2024 13:28
Copy link
Contributor

@pvlugter pvlugter left a comment

Choose a reason for hiding this comment

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

LGTM

@patriknw patriknw added this to the 1.6.3 milestone Nov 22, 2024
@patriknw patriknw merged commit 197d260 into main Nov 22, 2024
21 of 22 checks passed
@patriknw patriknw deleted the wip-timestamp-validation2-patriknw branch November 22, 2024 09:10
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.

2 participants