schematracker(dm): Increase max-index-length config for dm schema tracker (#11465) #11466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automated cherry-pick of #11465
What problem does this PR solve?
Issue Number: close #11459
What is changed and how it works?
DM schema tracker uses the default tidb max-index-length config (3072), regardless of the config value of the downstream tidb. If the downstream tidb configures a larger value, then ddls that execute successfully against the downstream TiDB could fail in the schema tracker.
While DM's schema tracker makes an effort to suppress these kinds of errors, it only applies to single column, non-unique indexes.
This change updates the config of DM schema tracker to use the maximum max-index-length, or 3072*4 (12288). Ideally, DM would use the config of the downstream TiDB directly. However, we already are less strict w/ queries against DM schema tracker (running queries in non-strict, suppressing errors), and can extend the max length to maximum allowable. This way, we can ensure that any DDLs that would execute successfully against the downstream TiDB would be successful in the schema tracker, while not necessarily guaranteeing that any DDLs that fail against the downstream TiDB necessarily fail against DM's schema tracker.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
N
Do you need to update user documentation, design documentation or monitoring documentation?
N
Release note