ddl, importer: use captured collation mode for background encoding#69592
ddl, importer: use captured collation mode for background encoding#69592joechenrh wants to merge 17 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2805216 to
39075e2
Compare
39075e2 to
94e51a8
Compare
| User: userSctx.GetSessionVars().User.String(), | ||
| Keyspace: userSctx.GetStore().GetKeyspace(), | ||
| } | ||
| p.SetUseNewCollate(tbl.UseNewCollate()) |
There was a problem hiding this comment.
NewCollate Is actually an cluster(keyspace) attribute, not a table attribute, i think we should get it from current source of truth, i.e. the global variable, not from tbl
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Background ADD INDEX and IMPORT INTO encoding can run outside the submitting keyspace. In next-gen deployments, the worker current new-collation default can differ from the table or task setting, so common handle, index key, restored data, and generated expression encoding need a task-level snapshot instead of reading the worker-global value.
What changed?
Tests
go test -p=1 ./pkg/ddl/copr
go test -p=1 ./pkg/table/tables ./pkg/lightning/backend/kv ./pkg/executor/importer ./pkg/planner/core -run '^$'
Local next-gen mismatch validation where the submitting user keyspace and the worker/system keyspace use different new-collation defaults.
ADD INDEX coverage:
ADMIN CHECK TABLEafter backfill, with DDL job verification that the work ran through DXF.IMPORT INTO coverage:
ADMIN CHECK TABLEand query assertions after import.Baseline comparison: the same local validations fail before this change with index/table inconsistency and pass on this branch.