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: Doing a MoveTables Cancel does not remove tablet controls #13998

Closed
FancyFane opened this issue Sep 15, 2023 · 1 comment · Fixed by #14008
Closed

Bug Report: Doing a MoveTables Cancel does not remove tablet controls #13998

FancyFane opened this issue Sep 15, 2023 · 1 comment · Fixed by #14008

Comments

@FancyFane
Copy link
Collaborator

Overview of the Issue

When running MoveTables workflows it's common for us to perform various test such as doing a SwitchTraffic to point our source; and to do a ReverseTraffic to point back to the source keyspace. At the end of our testing our environments typically point their traffic back to the source; while we cancel the previously running MoveTables workflows.

Recently it was discovered that when we do a MoveTables Cancel it doesn't clean up Tablet controls, and it remains even when all the workflows are no longer running; and the need for tablet controls becomes irrelevant.

Reproduction Steps

  1. Run a workflow and do a SwitchTraffic and then a ReverseTraffic; this will put tablet controls on your target shards. This can be shown with GetShard:
$ vtctlclient --server :15999 GetShard fane_import_sharded/-80
{
...
  "tablet_controls": [
    {
      "tablet_type": 1,
      "cells": [],
      "denied_tables": [
        "sbtest1",
        "sbtest2",
        "sbtest3",
        "sbtest4",
        "sbtest5",
        "sbtest6",
        "testing"
      ],
...
}
  1. Run a Workflow Cancel to remove the running workflows
$ vtctlclient --server :15999 MoveTables cancel fane_import_sharded.import-shard-80 
cancel was successful for workflow fane_import_sharded.import-shard-80
Start State: Reads partially switched, for shards: 80-. Writes partially switched, for shards: 80-
Current State: Workflow Not Found
  1. Note that the tablet controls remain after the workflow is removed:
$ vtctlclient --server :15999 GetShard fane_import_sharded/-80
{
...
  "tablet_controls": [
    {
      "tablet_type": 1,
      "cells": [],
      "denied_tables": [
        "sbtest1",
        "sbtest2",
        "sbtest3",
        "sbtest4",
        "sbtest5",
        "sbtest6",
        "testing"
      ],
...
}

Binary Version

Vitess 16.0.3

Operating System and Environment details

n/a

Log Fragments

n/a
@FancyFane FancyFane added Type: Bug Needs Triage This issue needs to be correctly labelled and triaged labels Sep 15, 2023
@frouioui frouioui added Component: VReplication and removed Needs Triage This issue needs to be correctly labelled and triaged labels Sep 15, 2023
@frouioui
Copy link
Member

@vitessio/vreplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants