Skip to content

VTGate VStream: Ensure reasonable delivery time for reshard journal event #16639

Merged
mattlord merged 14 commits intovitessio:mainfrom
planetscale:vstream_resume_after_reshard
Aug 29, 2024
Merged

VTGate VStream: Ensure reasonable delivery time for reshard journal event #16639
mattlord merged 14 commits intovitessio:mainfrom
planetscale:vstream_resume_after_reshard

Conversation

@mattlord
Copy link
Member

@mattlord mattlord commented Aug 23, 2024

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:

git checkout vstream_resume_after_reshard
make build

Update the example vstream client:

diff --git a/examples/local/vstream_client.go b/examples/local/vstream_client.go
index 98d2129f89..3c19bd965d 100644
--- a/examples/local/vstream_client.go
+++ b/examples/local/vstream_client.go
@@ -44,14 +44,10 @@ func main() {
                vgtid = &binlogdatapb.VGtid{
                        ShardGtids: []*binlogdatapb.ShardGtid{{
                                Keyspace: "customer",
-                               Shard:    "-80",
+                               Shard:    "0",
                                // Gtid "" is to stream from the start, "current" is to stream from the current gtid
                                // you can also specify a gtid to start with.
                                Gtid: "", //"current"  // "MySQL56/36a89abd-978f-11eb-b312-04ed332e05c2:1-265"
-                       }, {
-                               Keyspace: "customer",
-                               Shard:    "80-",
-                               Gtid:     "",
                        }}}
        } else {
                vgtid = &binlogdatapb.VGtid{
@@ -75,6 +71,7 @@ func main() {
        flags := &vtgatepb.VStreamFlags{
                //MinimizeSkew:      false,
                //HeartbeatInterval: 60, //seconds
+               StopOnReshard: true,
        }
        reader, err := conn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, flags)
        for {
cd examples/local
alias vtctldclient='command vtctldclient --server=localhost:15999'

./101_initial_cluster.sh; mysql < ../common/insert_commerce_data.sql; ./201_customer_tablets.sh; ./202_move_tables.sh; ./203_switch_reads.sh; ./204_switch_writes.sh; ./205_clean_commerce.sh

sleep 60

go run vstream_client.go

# In another shell
./301_customer_sharded.sh; ./302_new_shards.sh; ./303_reshard.sh; ./304_switch_reads.sh; ./305_switch_writes.sh

# Note and copy the first GTID for the customer/0 shard after the copy completed event (should be 1-56)

Update the example vstream client again, specifying the GTID we saved above (the GTID's UUID will differ from this diff):

diff --git a/examples/local/vstream_client.go b/examples/local/vstream_client.go
index 98d2129f89..2ed93b92bb 100644
--- a/examples/local/vstream_client.go
+++ b/examples/local/vstream_client.go
@@ -44,14 +44,10 @@ func main() {
                vgtid = &binlogdatapb.VGtid{
                        ShardGtids: []*binlogdatapb.ShardGtid{{
                                Keyspace: "customer",
-                               Shard:    "-80",
+                               Shard:    "0",
                                // Gtid "" is to stream from the start, "current" is to stream from the current gtid
                                // you can also specify a gtid to start with.
-                               Gtid: "", //"current"  // "MySQL56/36a89abd-978f-11eb-b312-04ed332e05c2:1-265"
-                       }, {
-                               Keyspace: "customer",
-                               Shard:    "80-",
-                               Gtid:     "",
+                               Gtid: "d61b2d76-60eb-11ef-9bee-60a726c671e2:1-56", //"current"  // "MySQL56/36a89abd-978f-11eb-b312-04ed332e05c2:1-265"
                        }}}
        } else {
                vgtid = &binlogdatapb.VGtid{
@@ -75,6 +71,7 @@ func main() {
        flags := &vtgatepb.VStreamFlags{
                //MinimizeSkew:      false,
                //HeartbeatInterval: 60, //seconds
+               StopOnReshard: true,
        }
        reader, err := conn.VStream(ctx, topodatapb.TabletType_PRIMARY, vgtid, filter, flags)
        for {

Run the vstream client again and you'll see the stream end with a resharding journal event like this:

❯ go run vstream_client.go
[type:BEGIN timestamp:1724469519 current_time:1724470495748802000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-57"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469519 current_time:1724470495748819000 keyspace:"customer" shard:"0"]
[type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-58"}} keyspace:"customer" shard:"0" type:OTHER timestamp:1724469519 current_time:1724470495748876000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469519 current_time:1724470495748880000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-59"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469519 current_time:1724470495748895000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469519 current_time:1724470495748898000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-60"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469519 current_time:1724470495748919000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469546 current_time:1724470495748924000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-61"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469546 current_time:1724470495748932000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469546 current_time:1724470495748937000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-62"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469546 current_time:1724470495748943000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469546 current_time:1724470495748948000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-63"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469546 current_time:1724470495748954000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469546 current_time:1724470495748957000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-64"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469546 current_time:1724470495748964000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469546 current_time:1724470495748979000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-65"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469546 current_time:1724470495748986000 keyspace:"customer" shard:"0"]
[type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-66"}} keyspace:"customer" shard:"0" type:OTHER timestamp:1724469546 current_time:1724470495748995000 keyspace:"customer" shard:"0"]
[type:BEGIN timestamp:1724469546 current_time:1724470495748999000 keyspace:"customer" shard:"0" type:JOURNAL timestamp:1724469546 journal:{id:8200191490597391617 migration_type:SHARDS tables:"/.*" local_position:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-60" shard_gtids:{keyspace:"customer" shard:"80-" gtid:"MySQL56/96b2b596-61c7-11ef-a886-61ad413e7385:1-52"} shard_gtids:{keyspace:"customer" shard:"-80" gtid:"MySQL56/91d7c57a-61c7-11ef-9e52-65bd85625ba0:1-52"} participants:{keyspace:"customer" shard:"0"}} current_time:1724470495749337000 keyspace:"customer" shard:"0" type:VGTID vgtid:{shard_gtids:{keyspace:"customer" shard:"0" gtid:"MySQL56/7180bfa2-61c7-11ef-af44-65bd845c4133:1-67"}} keyspace:"customer" shard:"0" type:COMMIT timestamp:1724469546 current_time:1724470495749339000 keyspace:"customer" shard:"0"]
stream ended

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:

while true; do go run vstream_client.go | grep -q JOURNAL || say "failure"; done

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
@vitess-bot
Copy link
Contributor

vitess-bot bot commented Aug 23, 2024

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot 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
@github-actions github-actions bot added this to the v21.0.0 milestone Aug 23, 2024
Signed-off-by: Matt Lord <mattalord@gmail.com>
@mattlord 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 <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
@codecov
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 68.98%. Comparing base (e6843dc) to head (e6b9486).
Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
go/vt/vtgate/vstream_manager.go 60.00% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@mattlord mattlord force-pushed the vstream_resume_after_reshard branch from ba1e660 to 5a543d2 Compare August 23, 2024 21:16
Signed-off-by: Matt Lord <mattalord@gmail.com>
@mattlord mattlord force-pushed the vstream_resume_after_reshard branch from 5a543d2 to 9dc4133 Compare August 23, 2024 21:29
Signed-off-by: Matt Lord <mattalord@gmail.com>
…reshard

Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
@mattlord 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 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 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 <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
@mattlord mattlord marked this pull request as ready for review August 24, 2024 15:11
Signed-off-by: Matt Lord <mattalord@gmail.com>
@mattlord mattlord force-pushed the vstream_resume_after_reshard branch from c53790d to 9159b4f Compare August 24, 2024 15:52
Signed-off-by: Matt Lord <mattalord@gmail.com>
…reshard

Signed-off-by: Matt Lord <mattalord@gmail.com>
@mattlord mattlord merged commit d916e81 into vitessio:main Aug 29, 2024
@mattlord mattlord deleted the vstream_resume_after_reshard branch August 29, 2024 02:33
makinje16 added a commit to slackhq/vitess that referenced this pull request Mar 20, 2025
…vent (vitessio#16639)

Signed-off-by: Malcolm Akinje <malcolm.akinje@gmail.com>
Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>
tanjinx added a commit to slackhq/vitess that referenced this pull request Mar 24, 2025
…d Journal Events (#585)

* VTGate VStream: Ensure reasonable delivery time for reshard journal event  (vitessio#16639)

Signed-off-by: Malcolm Akinje <malcolm.akinje@gmail.com>
Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>

* Backport sqlparser patch for v15->v19 upgrade: 14763 Fix accepting bind variables in time related function calls (#590)

* Fix accepting bind variables in time related function calls. (vitessio#14763)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* fix test

---------

Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>

* Upgrade vitess addons to 0.19.8 (#591)

This upgrade allows us to control whether vtorc raises problems or not
via an environment variable.

Signed-off-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com>

* Use prefix in all vtorc check and recover logs (vitessio#17526) (#592)

This is a backport of vitessio#17526 . Original PR description below:

Description
This is meant to make recovery actions more easily identified from the logs. See vitessio#17465

Signed-off-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com>

* `slack-19.0`: various backports for `vtorc`, part 2 (#596)

* Ensure all topo read calls consider `--topo_read_concurrency` (vitessio#17276)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* Revert "add keyrange support for vtorc clusters_to_watch (#457)"

This reverts commit 45c2199.

* [release-19.0] `vtorc`: require topo for `Healthy: true` in `/debug/health` (vitessio#17129) (vitessio#17351)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>

* `vtorc`: fetch all tablets from cells once + filter during refresh (vitessio#17388)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* Support KeyRange in `--clusters_to_watch` flag (vitessio#17604)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* missing func

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* Add api end point to print the current database state in VTOrc (vitessio#15485)

Signed-off-by: Manan Gupta <manan@planetscale.com>

---------

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>

* `slack-19.0`: `vtorc`: improve handling of partial cell topo results (#599)

* `vtorc`: improve handling of partial cell topo results

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* add unit test

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* improve test

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* add comments

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* move sort to test

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* goimports

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `slack-19.0`: skip tests that will fail on v15 downgrade testing (#605)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `slack-19.0`: Add stats for shards watched by VTOrc (#606)

* Add stats for shards watched by VTOrc

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* Use len() in make

---------

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* Add `GetServerStatus` RPC to use in PRS (vitessio#16022) (#607)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>

* backport/patch connection pool bug/perf fixes (#604)

* [release-19.0] smartconnpool: do not allow connections to starve (vitessio#17675) (vitessio#17683)

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>

* smartconnpool: Better handling for idle expiration (vitessio#17756)

Signed-off-by: Vicent Marti <vmg@strn.cat>

---------

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Vicent Martí <42793+vmg@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>

* pool: reopen connection closed by idle timeout (vitessio#17818) (#609)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Vicent Martí <42793+vmg@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: Vicent Martí <42793+vmg@users.noreply.github.com>

* VReplication: Support excluding lagging tablets and use this in vstream manager (vitessio#17835) (#612)

* `slack-19.0`: backport v22 VTOrc optimizations, part 2 (#613)

* `vtorc`: remove duplicate instance read from backend (vitessio#17834)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: add index for `inst.ReadInstanceClusterAttributes` table scan

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* Add stats for shards watched by VTOrc, purge stale shards (vitessio#17815) (#616)

* --consolidator-query-waiter-cap to set the max number of waiter for consolidated query (vitessio#17244) (#614)

Signed-off-by: Jun Wang <jun.wang@demonware.net>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: jwang <121262788+jwangace@users.noreply.github.com>
Co-authored-by: Jun Wang <jun.wang@demonware.net>

* `slack-19.0` backport v22 `vtorc` optimizations + stats, part 3 (#618)

* Remove unused code in discovery queue creation (vitessio#17515)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* vtorc: Cleanup unused code (vitessio#15508)

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* `vtorc`: cleanup discover queue, add concurrency flag (vitessio#17825)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: add tablets watched stats

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix missing merge conflict update

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: skip unnecessary `inst.ReadTablet` in `logic.LockShard(...)`

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: use `errgroup` in keyspace/shard discovery

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix import

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix ineffassign

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* missing import

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: add stats for discovery workers

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* get count from backend

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* rm unused map

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>

* Bp pr 17558 pr 17858.slack19.0 (#615)

* VReplication: Improve error handling in VTGate VStreams (vitessio#17558)

Signed-off-by: Tom Thornton <thomaswilliamthornton@gmail.com>

* Backport vitessio#17858

---------

Signed-off-by: Tom Thornton <thomaswilliamthornton@gmail.com>

* `slack-19.0`: re-backport tweaks from vitessio#17911 (#621)

* fix bug in reverse `if`

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* simplify

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* add `ReadTabletCountsByShard` test

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* use map of map

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* capitalize Cell

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* gofmt lint

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix plural in names

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix releasing the global read lock when mysqlshell backup fails (vitessio#17000) (#623)

Signed-off-by: Renan Rangel <rrangel@slack-corp.com>

* VStream API: allow keyspace-level heartbeats to be streamed (vitessio#16593) (#620)

* VStream API: allow keyspace-level heartbeats to be streamed (vitessio#16593)

Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>

* `slack-19.0` backport v22 `vtorc` optimizations + stats, part 3 (#618)

* Remove unused code in discovery queue creation (vitessio#17515)

Signed-off-by: Manan Gupta <manan@planetscale.com>

* vtorc: Cleanup unused code (vitessio#15508)

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* `vtorc`: cleanup discover queue, add concurrency flag (vitessio#17825)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: add tablets watched stats

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix missing merge conflict update

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: skip unnecessary `inst.ReadTablet` in `logic.LockShard(...)`

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: use `errgroup` in keyspace/shard discovery

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix import

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix ineffassign

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* missing import

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* `vtorc`: add stats for discovery workers

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* get count from backend

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* rm unused map

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>

* Bp pr 17558 pr 17858.slack19.0 (#615)

* VReplication: Improve error handling in VTGate VStreams (vitessio#17558)

Signed-off-by: Tom Thornton <thomaswilliamthornton@gmail.com>

* Backport vitessio#17858

---------

Signed-off-by: Tom Thornton <thomaswilliamthornton@gmail.com>

* `slack-19.0`: re-backport tweaks from vitessio#17911 (#621)

* fix bug in reverse `if`

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* simplify

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* add `ReadTabletCountsByShard` test

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* use map of map

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* capitalize Cell

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* gofmt lint

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

* fix plural in names

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>

---------

Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tom Thornton <thomaswilliamthornton@gmail.com>
Signed-off-by: Malcolm Akinje <malcolm.akinje@gmail.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: Tom Thornton <thomaswilliamthornton@gmail.com>

* Increase health check channel buffer (vitessio#17821) (#625)

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>

* VStream: Allow for automatic resume after Reshard across VStreams (vitessio#15393) (#627)

Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>

---------

Signed-off-by: Malcolm Akinje <malcolm.akinje@gmail.com>
Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Vicent Martí <42793+vmg@users.noreply.github.com>
Signed-off-by: Jun Wang <jun.wang@demonware.net>
Signed-off-by: Tom Thornton <thomaswilliamthornton@gmail.com>
Signed-off-by: Renan Rangel <rrangel@slack-corp.com>
Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com>
Co-authored-by: Tanjin Xu <109303790+tanjinx@users.noreply.github.com>
Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>
Co-authored-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Vicent Martí <42793+vmg@users.noreply.github.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: Tom Thornton <thomaswilliamthornton@gmail.com>
Co-authored-by: jwang <121262788+jwangace@users.noreply.github.com>
Co-authored-by: Jun Wang <jun.wang@demonware.net>
Co-authored-by: Dirkjan Bussink <d.bussink@gmail.com>
Co-authored-by: Renan Rangel <rvrangel@users.noreply.github.com>
Co-authored-by: Matt Lord <mattalord@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: VStream with StopOnReshard when resumed does not retransmit Journal event

3 participants