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

*: migrate DDLs run with internal executor to CollectionFactory.TxnWithExecutor() #87281

Closed
ZhouXing19 opened this issue Sep 1, 2022 · 1 comment · Fixed by #86334
Closed
Assignees
Labels
branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ZhouXing19
Copy link
Collaborator

ZhouXing19 commented Sep 1, 2022

The previous design of the internal executor itself is erroneous when running a DDL in a not nil transaction, for it creates its own set of descriptor collection and schema change job records. The internal executor depends on the descriptor collection to see catalog writes in the current transaction. Without coupling that internal executor to the collection, the queries will use a leased descriptor and not see the write.

The new CollectionFactory.TxnWithExecutor() will solve this problem by always passing the same txn-related meta info to the child conn executor in the internal executor, if it is run within the same txn.

Epic CRDB-14492
Jira issue: CRDB-19251

@ZhouXing19 ZhouXing19 added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) GA-blocker labels Sep 1, 2022
@ZhouXing19 ZhouXing19 self-assigned this Sep 1, 2022
@blathers-crl
Copy link

blathers-crl bot commented Sep 1, 2022

Hi @ZhouXing19, please add branch-* labels to identify which branch(es) this release-blocker affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants