sql: refactor internal executor factory to accept init function#73193
Closed
adityamaru wants to merge 2 commits intocockroachdb:masterfrom
Closed
sql: refactor internal executor factory to accept init function#73193adityamaru wants to merge 2 commits intocockroachdb:masterfrom
adityamaru wants to merge 2 commits intocockroachdb:masterfrom
Conversation
Member
This change refactors the InternalExecutorFactory to take in a closure that allows injecting external state into a new internal executor. Release note: None
c0cac43 to
a21f64b
Compare
In a bid to make the InternalExecutor more tightly bound with certain conn executor state such as transaction, session data, extraTxnState (including descs collection), this patch removes the `InternalExecutor` field from the executor config. In this way consumers of the IE cannot just run queries off of this free floating instance of the IE, but instead have to initialize a new IE in the context of the surrounding txn. The `InternalExecFactory` currently takes a closure that allows for injecting necessary state into a newly created IE, but one could imagine a future where we use typed parameters to force all users to bind the IE with the surrounding state it is being used in. Release note: None
a21f64b to
323561b
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 change refactors the InternalExecutorFactory to take in
a closure that allows injecting external state into a new internal
executor.
Release note: None