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

colexec: remove a couple of now-stale TODOs #89628

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Oct 10, 2022

This commit removes a stale TODO about investigating why the
materializers could not be released in all cases when they are created
to wrap a row-by-row processor into the vectorized flow. The root cause
was addressed in #88973 (the problem was that we could call
ConsumerClosed on an already Released object), so it is now safe to
always release the materializers. For the same reason we no longer need
to perform a deep copy of the closers when creating the materializer.

Additionally, this commit removes a temporary allocation for a slice of
releasables by directly modifying the main "tracking" slice.

Release note: None

Epic: None

@yuzefovich yuzefovich requested a review from a team as a code owner October 10, 2022 07:32
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)


-- commits line 7 at r1:
[nit] could this be a PR number instead?


pkg/sql/colexec/colbuilder/execplan.go line 74 at r1 (raw file):

	newToWrap func([]execinfra.RowSource) (execinfra.RowSource, error),
	factory coldata.ColumnFactory,
	releasables *[]execreleasable.Releasable,

[super nit] I think I prefer passing the slice by value, appending to it and then returning it. Up to you though.

This commit removes a stale TODO about investigating why the
materializers could not be released in all cases when they are created
to wrap a row-by-row processor into the vectorized flow. The root cause
was addressed in cockroachdb#88973 (the problem was that we could call
`ConsumerClosed` on an already `Release`d object), so it is now safe to
always release the materializers. For the same reason we no longer need
to perform a deep copy of the closers when creating the materializer.

Additionally, this commit removes a temporary allocation for a slice of
releasables by directly modifying the main "tracking" slice.

Release note: None
@yuzefovich yuzefovich force-pushed the execplan-materializer branch from 9f9133d to d4d5d99 Compare October 10, 2022 12:57
Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @DrewKimball)


-- commits line 7 at r1:

Previously, DrewKimball (Drew Kimball) wrote…

[nit] could this be a PR number instead?

Done.


pkg/sql/colexec/colbuilder/execplan.go line 74 at r1 (raw file):

Previously, DrewKimball (Drew Kimball) wrote…

[super nit] I think I prefer passing the slice by value, appending to it and then returning it. Up to you though.

There is already precedent for doing this way in this file, so I'll keep the current way, but please feel to open up a PR to address all places - I don't have strong preference either way.

@craig
Copy link
Contributor

craig bot commented Oct 10, 2022

Build succeeded:

@craig craig bot merged commit 71fbe65 into cockroachdb:master Oct 10, 2022
@yuzefovich yuzefovich deleted the execplan-materializer branch October 10, 2022 14:25
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.

3 participants