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

[Voyager] Import Data fails on the target for a new migration due to ALTER on metadata tables if CDC was enabled in the previous run #2272

Open
1 task done
shubham-yb opened this issue Jan 29, 2025 · 0 comments

Comments

@shubham-yb
Copy link
Contributor

shubham-yb commented Jan 29, 2025

Jira Link: DB-15087

Description

If CDC was enabled in a run of Voyager (Fall Forward / Fall Back) and end migration is not run for any reason (to delete the stream and drop the metadata tables), if we try another migration to the same database, it will fail on the ALTER TABLE for the Voyager metadata tables due to the restriction of not rewriting tables that are a part of CDC replication.
We had introduced this alter to change the column datatypes to make them more dynamic.

2025-01-23 05:36:29.294685 INFO yugabytedb.go:381 Executing on target: [ALTER TABLE ybvoyager_metadata.ybvoyager_import_data_batches_metainfo_v3 ALTER COLUMN data_file_name TYPE TEXT;]
2025-01-23 05:36:29.733748 WARN yugabytedb.go:387 Error while running [ALTER TABLE ybvoyager_metadata.ybvoyager_import_data_batches_metainfo_v3 ALTER COLUMN data_file_name TYPE TEXT;] attempt 3: run query "ALTER TABLE ybvoyager_metadata.ybvoyager_import_data_batches_metainfo_v3 ALTER COLUMN data_file_name TYPE TEXT;" on target "127.0.01": ERROR: Invalid table definition: Error creating table sdab.ybvoyager_import_data_batches_metainfo_v3 on the master: cannot rewrite a table that is a part of CDC or XCluster replication. See https://github.com/yugabyte/yugabyte-db/issues/16625. (SQLSTATE XX000)

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants