-
Notifications
You must be signed in to change notification settings - Fork 197
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
Sync-diff-inspector's GC keeper with specific snapshot
does not work with TiDB v6.1 or below
#834
Comments
tidb-tools/sync_diff_inspector/diff.go Lines 327 to 351 in 2109c5e
Sync-diff-inspector determines the safepointTS using the following method:
Unfortunately, on TiDB v6.1 and before, there is a bug in SHOW MASTER STATUS that when $ # v6.1.7
$ mysql -u root -h 127.1 -P 4000 -e 'set tidb_snapshot = now(); show master status'
+-------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+-------------+----------+--------------+------------------+-------------------+
| tidb-binlog | 0 | | | |
+-------------+----------+--------------+------------------+-------------------+
$ # v6.5.3
$ mysql -u root -h 127.1 -P 4000 -e 'set tidb_snapshot = now(); show master status;'
+-------------+--------------------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+-------------+--------------------+--------------+------------------+-------------------+
| tidb-binlog | 454714341457920000 | | | |
+-------------+--------------------+--------------+------------------+-------------------+ Since 0 is smaller than any given value, sync-diff-inspector will pick this as the safepoint and issued an invalid request to PD which is ignored. We are not going to figure out how to fix TiDB. But sync-diff-inspector should prepare for a zero reply from SHOW MASTER STATUS and treat this as invalid. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
Use TiDB as a data-source of sync-diff-inspector.
Set
snapshot
config to some fixed value.Inspect the Service GC Safepoint via
pd-ctl service-gc-safepoint
The service-gc-safepoint list contains
Sync_diff_xxxxxxxxx
.The safepoint is not registered.
The sync-diff log suggested the safepoint is 0.
tidb-server -V
or runselect tidb_version();
on TiDB)?v5.4.1, v6.1.7
sync-diff-inspector
pump -V
ortidb-lightning -V
orsyncer -V
)?v6.5.3
The text was updated successfully, but these errors were encountered: