-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
release-22.2: *: add restriction to running DDL with internal executors #88287
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is part of the migration of existing DDL statement with internal executor to `descs.CollectionFactory.TxnWithExecutor()`. DDL statements should only be run with an internal executor that's created via this function. Release justification: Low risk, high benefit changes to existing functionality Release note: none
fixes #76764 Release justification: Low risk, high benefit changes to existing functionality Release note: none
…r()` for DDLs This is part of the project to migrate existing DDL statements running with an internal executor to `descs.CollectionFactory()`. DDLs are only allowed to run with internal executor inited via this function. Release justification: Low risk, high benefit changes to existing functionality Release note: None
…tor()` for DDLs This commit is to migrate the existing DDLs to using `planner.WithInternalExecutor()`. DDLs with internal executors are only allowed if the latter is bounded with txn-realated metadata. Release justification: Low risk, high benefit changes to existing functionality Release note: none
…tor()` for DDLs This commit is part of the project to migrate DDLs running with internal executor with the correct interface. DDLs are only allowed to run with internal executor that is bound to txn-related metadata. Release justification: Low risk, high benefit changes to existing functionality Release note: none
We stripped `txn` from the parameter list in `cleanupTempSystemTables()`. It was run with not-nil txn by mistake, which is a mis-usage of running internal executor with DDLs. Release justification: bug fix Release note: none
This is another DDL statement executed via an internal executor mal-inited. Change it to use the right interface. Release justification: Release note: none.
…tor with txn When using internal executor to run DDL statements under a not-nil outer txn, we require txn-related metadata (such as descriptor collections) to be passed to the internal executor from the outer caller too. This commit is to add a gate for this use case. Release justification: bug fix Release note: none
It was causing the lint in CI to fail. Release note: None
blathers-crl
bot
force-pushed
the
blathers/backport-release-22.2-86334
branch
from
September 20, 2022 19:59
e61aa5c
to
fb3a0f9
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
blathers-crl
bot
requested review from
benbardin,
stevendanna,
ajwerner,
dt,
rafiss,
ZhouXing19 and
a team
and removed request for
a team
September 20, 2022 19:59
blathers-crl
bot
added
the
blathers-backport
This is a backport that Blathers created automatically.
label
Sep 20, 2022
rafiss
approved these changes
Sep 20, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! just needs a post on #release-backports cc @ZhouXing19
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
blathers-backport
This is a backport that Blathers created automatically.
O-robot
Originated from a bot.
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.
Backport 9/9 commits from #86334 on behalf of @ZhouXing19.
/cc @cockroachdb/release
The current internal executor has its lifecycle, which makes it erroneous
when being used to execute DDL statements if under an outer txn.
In this commit, we
descs.CollectionFactory.TxnWithExecutor()
orplanner.WithInternalExecutor()
.Only internal executors inited via these 2 interfaces are bounded with txn-related
metadata, and hence are allowed to run DDLs in a transactional manner.
txn-related metadata.
fixes #87281
Release justification: bug fix for the internal executor
Release note: none
Release justification: