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: Timestamp validation of previous seqNr #1246

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

patriknw
Copy link
Member

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

@patriknw patriknw marked this pull request as draft November 15, 2024 15:14

// starting with 2 projections, testing 512-1023
offsetStore1.saveOffset(OffsetPidSeqNr(TimestampOffset(time(2), Map(p1 -> 1L)), p1, 1L)).futureValue
offsetStore1.saveOffset(OffsetPidSeqNr(TimestampOffset(time(100), Map(p3 -> 1L)), p3, 1L)).futureValue
Copy link
Member Author

Choose a reason for hiding this comment

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

My hypothesis is that the lower scale 512-1023 projection deleted some offsets from 512-767 slices. Then when that higher scale projection 512-767 is starting it is trying the timestamp of previous validation but that falls within the time window of that projection and is therefore rejected.

* base the validaiton time window for the previous sequence number
  on start timestamp and backtracking window
@patriknw patriknw force-pushed the wip-timestamp-validation-patriknw branch from bb9d82b to fa3ecfc Compare November 25, 2024 08:53
@patriknw patriknw marked this pull request as ready for review November 25, 2024 08:53
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

akka-projection-r2dbc/src/main/resources/reference.conf Outdated Show resolved Hide resolved
@patriknw patriknw merged commit 7c1b9a4 into main Nov 26, 2024
21 of 22 checks passed
@patriknw patriknw deleted the wip-timestamp-validation-patriknw branch November 26, 2024 09:28
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