-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VTGate VStream: Ensure reasonable delivery time for reshard journal event #16639
Merged
mattlord
merged 14 commits into
vitessio:main
from
planetscale:vstream_resume_after_reshard
Aug 29, 2024
Merged
VTGate VStream: Ensure reasonable delivery time for reshard journal event #16639
mattlord
merged 14 commits into
vitessio:main
from
planetscale:vstream_resume_after_reshard
Aug 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Aug 23, 2024
Signed-off-by: Matt Lord <[email protected]>
mattlord
added
Type: Bug
Component: VReplication
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
labels
Aug 23, 2024
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16639 +/- ##
==========================================
- Coverage 68.99% 68.98% -0.02%
==========================================
Files 1562 1562
Lines 200754 200762 +8
==========================================
- Hits 138508 138490 -18
- Misses 62246 62272 +26 ☔ View full report in Codecov by Sentry. |
mattlord
force-pushed
the
vstream_resume_after_reshard
branch
from
August 23, 2024 21:16
ba1e660
to
5a543d2
Compare
Signed-off-by: Matt Lord <[email protected]>
mattlord
force-pushed
the
vstream_resume_after_reshard
branch
from
August 23, 2024 21:29
5a543d2
to
9dc4133
Compare
Signed-off-by: Matt Lord <[email protected]>
…reshard Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
mattlord
changed the title
VReplication: VTGate VStream: send reshard journal event immediately
VReplication: VTGate VStream: ensure reasonable delivery time for reshard journal event
Aug 24, 2024
mattlord
changed the title
VReplication: VTGate VStream: ensure reasonable delivery time for reshard journal event
VTGate VStream: ensure reasonable delivery time for reshard journal event
Aug 24, 2024
mattlord
changed the title
VTGate VStream: ensure reasonable delivery time for reshard journal event
VTGate VStream: Ensure reasonable delivery time for reshard journal event
Aug 24, 2024
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
mattlord
requested review from
rohit-nayak-ps,
ajm188,
deepthi,
frouioui and
GuptaManan100
as code owners
August 24, 2024 15:11
Signed-off-by: Matt Lord <[email protected]>
mattlord
force-pushed
the
vstream_resume_after_reshard
branch
from
August 24, 2024 15:52
c53790d
to
9159b4f
Compare
Signed-off-by: Matt Lord <[email protected]>
…reshard Signed-off-by: Matt Lord <[email protected]>
deepthi
approved these changes
Aug 27, 2024
rohit-nayak-ps
approved these changes
Aug 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a follow-up to #15395 where we added support for resuming a vtgate VStream that was not running when a keyspace had been resharded.
When resuming a vtgate VStream that has the
StopOnReshard
flag enabled, the reshard journal event was not always fully sent and received as the stream could end (via context cancellation) before the journal event was sent and received in the grpc stream. This timing issue would happen fairly often when all processes are on the same machine such as when using the local examples (see manual test below).In this PR we enforce a reasonable minimum amount time from the point we have sent the journal event in the
vstreamManager
to the point that we end the tablet and client stream. This prevents a race between sending the message at the higher layer down to the grpc layer and when the stream is closed via context cancellation — which then causes the lower layer grpc SendMsg/RecvMsg to fail with a context canceled error.The following manual test then works as expected every time on the PR branch:
Update the example vstream client:
Update the example vstream client again, specifying the GTID we saved above (the GTID's UUID will differ from this diff):
Run the vstream client again and you'll see the stream end with a resharding journal event like this:
You can execute this last step as many times as you like. For example, I've run this for over an hour w/o a failure:
Related Issue(s)
Checklist