-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
streaming: fix snapshot cache bug #9772
Conversation
when the cache entry is created from resuming a stream.
🤔 Double check that this PR does not require a changelog entry in the |
Previously a snapshot created as part of a resumse-stream request could have incorrectly cached the newSnapshotToFollow event. This would cause clients to error because they received an unexpected framing event.
be3c23f
to
ba3a1b9
Compare
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.
Thanks 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
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/328108. |
🍒✅ Cherry pick of commit 363d738 onto |
streaming: fix snapshot cache bug
streaming: fix snapshot cache bug
Previously a snapshot created as part of a resume-stream request could have incorrectly cached the
newSnapshotToFollow
event. When the next subscribe request was received withIndex=0
the returned snapshot would cause clients to error because they received an unexpected framing event.Fixed the bug by saving a snapshot without the framing event, then creating a new snapshot to prepend the framing event.