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

Bug Report: UpdateVReplicationWorkflow tablet RPC only updates one stream #14446

Closed
Tracked by #13990
mattlord opened this issue Nov 2, 2023 · 0 comments · Fixed by #14447
Closed
Tracked by #13990

Bug Report: UpdateVReplicationWorkflow tablet RPC only updates one stream #14446

mattlord opened this issue Nov 2, 2023 · 0 comments · Fixed by #14447

Comments

@mattlord
Copy link
Contributor

mattlord commented Nov 2, 2023

Overview of the Issue

This issue was found while working on: #14424

The workflow update command allows you to update some configuration options for an existing workflow.

For most VReplication workflows there's a single stream per target tablet. In the cases of e.g. shard merges or materializations, however, you can have N streams (1 per source shard).

The workflow update command only updated one stream on each target shard.

Because the workflow start|stop command uses the same UpdateVReplicationWorkflow tablet RPC that the workflow update command does — only updating the state — it is also impacted by this.

In this scenario, where there's more than one stream on the target tablet, the update and start/stop commands simply DO NOTHING — which is reflected in the output as having changed none of the shards involved in the workflow rather than with returning an error.

Reproduction Steps

git checkout main && make build

cd examples/local

./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;  ./301_customer_sharded.sh; ./302_new_shards.sh; ./303_reshard.sh; ./304_switch_reads.sh; ./305_switch_writes.sh

# For stop/start
vtctldclient workflow --keyspace customer show --workflow cust2cust_reverse --compact --include-logs=false | grep state
vtctldclient workflow --keyspace customer stop --workflow cust2cust_reverse
vtctldclient workflow --keyspace customer show --workflow cust2cust_reverse --compact --include-logs=false | grep state

# For update
command mysql -u root --socket="${VTDATAROOT}/vt_0000000200/mysql.sock" -e "select cell from _vt.vreplication"
vtctldclient workflow --keyspace customer update --workflow cust2cust_reverse --cells cell1 --cells cell2
command mysql -u root --socket="${VTDATAROOT}/vt_0000000200/mysql.sock" -e "select cell from _vt.vreplication"

Binary Version

vtgate version Version: 19.0.0-SNAPSHOT (Git revision 3037acd816ba6e8cb299e00f478a8555dc0a1ab8 branch 'main') built on Thu Nov  2 19:17:24 EDT 2023 by matt@pslord.local using go1.21.3 darwin/arm64

Operating System and Environment details

N/A

Log Fragments

No response

@mattlord mattlord added this to the v18.0.0 milestone Nov 2, 2023
@mattlord mattlord self-assigned this Nov 2, 2023
@mattlord mattlord changed the title Bug Report: workflow update command only updates one stream per tablet Bug Report: UpdateVReplciationWorkflow tablet RPC only updates one stream per tablet Nov 3, 2023
@mattlord mattlord changed the title Bug Report: UpdateVReplciationWorkflow tablet RPC only updates one stream per tablet Bug Report: UpdateVReplicationWorkflow tablet RPC only updates one stream per tablet Nov 3, 2023
@mattlord mattlord changed the title Bug Report: UpdateVReplicationWorkflow tablet RPC only updates one stream per tablet Bug Report: UpdateVReplicationWorkflow tablet RPC only updates one stream Nov 3, 2023
@mattlord mattlord mentioned this issue Nov 4, 2023
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant