Skip to content

workloadrepo: when WORKLOAD_SCHEMA exists, BR failed to ignore it #58768

@bb7133

Description

@bb7133

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. enable 'workload repository':
tidb> set global tidb_workload_repository_dest='table';
tidb> admin create workload snapshot;
tidb> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA     |
| PERFORMANCE_SCHEMA |
| WORKLOAD_SCHEMA    |
| mysql              |
| sys                |
| test               |
+--------------------+
7 rows in set (0.01 sec)
  1. Make a full backup
bin/br backup full --storage "file:///tmp/br"
  1. Make a full restore
bin/br restore full --storage "file:///tmp/br"

or

bin/br restore full --with-sys-table --storage "file:///tmp/br"

2. What did you expect to see? (Required)

Restore successfully.

3. What did you see instead (Required)

Restore failed:

Error: user db/tables: WORKLOAD_SCHEMA.HIST_SNAPSHOTS, WORKLOAD_SCHEMA.HIST_CLIENT_ERRORS_SUMMARY_BY_HOST, WORKLOAD_SCHEMA.HIST_CLIENT_ERRORS_SUMMARY_BY_USER, WORKLOAD_SCHEMA.HIST_CLIENT_ERRORS_SUMMARY_GLOBAL, WORKLOAD_SCHEMA.HIST_TIKV_REGION_STATUS, WORKLOAD_SCHEMA.HIST_PROCESSLIST, WORKLOAD_SCHEMA.HIST_DATA_LOCK_WAITS, WORKLOAD_SCHEMA.HIST_TIDB_TRX, WORKLOAD_SCHEMA.HIST_MEMORY_USAGE, WORKLOAD_SCHEMA.HIST_DEADLOCKS, ...: [BR:Restore:ErrRestoreNotFreshCluster]cluster is not fresh

4. What is your TiDB version? (Required)

(master only since 'workload repository' is not released yet)
c199ddf

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions