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

VStream API: Add flag to stop streaming on a reshard #8628

Merged

Conversation

rohit-nayak-ps
Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps commented Aug 14, 2021

Description

A new flag StopOnReshard is added as an option that the VStream client can provide. Usually on a reshard of a shard that is participating in the stream, the VStream API sends all the events on the original shard and then automatically starts streaming from the new shard set. In this case the journal event is not sent on the stream.

This flag, if set, stops the stream after sending all the streams upto the reshard and includes the journal event pertaining to that reshard as the last event.

Signed-off-by: Rohit Nayak [email protected]

Related Issue(s)

#8595

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

@rohit-nayak-ps rohit-nayak-ps added Component: VReplication Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Aug 14, 2021
@rohit-nayak-ps rohit-nayak-ps linked an issue Aug 14, 2021 that may be closed by this pull request
@rohit-nayak-ps rohit-nayak-ps force-pushed the rn-vstream-api-stop-on-reshard branch from d8149d3 to 88ad81f Compare August 15, 2021 13:11
Signed-off-by: Rohit Nayak <[email protected]>
@rohit-nayak-ps rohit-nayak-ps marked this pull request as ready for review August 15, 2021 16:50
@rohit-nayak-ps rohit-nayak-ps requested review from deepthi and sougou and removed request for systay August 15, 2021 16:50
@rohit-nayak-ps rohit-nayak-ps requested a review from a team August 15, 2021 16:51
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM, but let's have @sougou review this too.

@@ -56,6 +56,8 @@ var (
"vreplication_cellalias",
"vstream_failover",
"vreplication_v2",
"vstream_stoponreshard_true",
Copy link
Member

Choose a reason for hiding this comment

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

Just for readability, you might consider adding more underscores.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix in my next PR, don't feel like babysitting CI for a couple of hours for this ...

@rohit-nayak-ps rohit-nayak-ps merged commit ba0b822 into vitessio:main Aug 17, 2021
@rohit-nayak-ps rohit-nayak-ps deleted the rn-vstream-api-stop-on-reshard branch August 17, 2021 09:05
DeathBorn added a commit to vinted/vitess that referenced this pull request Jan 25, 2023
Signed-off-by: Vilius Okockis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: VReplication Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option to not migrate vstream on shard split
4 participants