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

sql: refactor internal executor factory to accept init function #73193

Closed

Conversation

adityamaru
Copy link
Contributor

This change refactors the InternalExecutorFactory to take in
a closure that allows injecting external state into a new internal
executor.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

This change refactors the InternalExecutorFactory to take in
a closure that allows injecting external state into a new internal
executor.

Release note: None
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
@adityamaru adityamaru closed this Jan 24, 2022
@adityamaru adityamaru deleted the inject-extra-txn-state branch January 24, 2022 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants