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 PrevRedisId when SeqNo is 0 #1709

Merged
merged 4 commits into from
Oct 28, 2022
Merged

Fix PrevRedisId when SeqNo is 0 #1709

merged 4 commits into from
Oct 28, 2022

Conversation

JamesMurkin
Copy link
Contributor

@JamesMurkin JamesMurkin commented Oct 28, 2022

Currently from id 1666953497076:0:1:0 gets converted to 1666953497076--1 as we do newSeqNo = currentSeqNo - 1 which falls down when then currentSeqNo is 0

The above behavior is a bug and we now avoid doing it with a better if statement

Currently from id `1666953497076:0:1:0` gets converted to `1666953497076--1` as we do `newSeqNo = currentSeqNo - 1` which falls down when then currentSeqNo is 0

To prevent this, I simply limit the numbers to non-negative values
`
@JamesMurkin JamesMurkin changed the title Fix PrevRedisId by preventing negative values Fix PrevRedisId when SeqNo is 0 Oct 28, 2022
@JamesMurkin JamesMurkin enabled auto-merge (squash) October 28, 2022 12:38
@JamesMurkin JamesMurkin merged commit b9dbe6e into master Oct 28, 2022
@JamesMurkin JamesMurkin deleted the fix_prev_redis_id branch February 22, 2023 20:57
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.

None yet

2 participants