Skip to content

Bug Report: Starting MoveTables for sequence tables drops the VSchema type sequence attribute #13216

@FancyFane

Description

@FancyFane

Overview of the Issue

On a shard by shard migration, when you start a MoveTables for Sequence tables it can drop the sequence attribute from the vSchema.

Reproduction Steps

  1. Apply your VSchema for sequences and validate:
$ vtctlclient --server localhost:15999 GetVSchema fane_import
{
  "tables": {
    "sbtest1_seq": {
      "type": "sequence"
    },
    "sbtest2_seq": {
      "type": "sequence"
    },
    "sbtest3_seq": {
      "type": "sequence"
    },
    "sbtest4_seq": {
      "type": "sequence"
    },
    "sbtest5_seq": {
      "type": "sequence"
    },
    "sbtest6_seq": {
      "type": "sequence"
    }
  }
}
  1. Start your MoveTables command (this is using shard by shard migration)
$ vtctlclient --server localhost:15999 MoveTables -- --cells="${CELLS}" --all --tablet_types="in_order:REPLICA,PRIMARY" --source="fane_import_source" Create fane_import.import
Waiting for workflow to start:

Workflow started successfully with 1 stream(s)

The following vreplication streams exist for workflow fane_import.import:

id=2 on -/aws_useast1b_4-4141702636: Status: Copying. VStream Lag: 0s.
  1. Check you vSchema once again, and note the sequences attribute has been removed:
$ vtctlclient --server localhost:15999 GetVSchema fane_import
{
  "tables": {
    "sbtest1_seq": {},
    "sbtest2_seq": {},
    "sbtest3_seq": {},
    "sbtest4_seq": {},
    "sbtest5_seq": {},
    "sbtest6_seq": {}
  }
}

Binary Version

Version: Vitess 16.0.3

Operating System and Environment details

n/a

Log Fragments

n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions