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: rerun execbuilder for gist matching #127604

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Jul 22, 2024

This commit re-runs the execbuilder with the explain factory whenever plan-gist matching happens. This allows us to fully populate plan.txt contents of the bundle. Some care had to be taken to ensure that the new plan is used going forward (for correct annotation with exec stats). We also make a copy of the memo to be safe (so that the original memo isn't mutated by the execbuilder).

Follow-up to #125465.
Epic: None

Release note (bug fix): Previously, whenever CockroachDB collected a statement bundle when plan-gist-based matching was used, plan.txt file would be incomplete, and this is now fixed. The bug has been present since introduction of plan-gist-based matching feature in 23.1 but was partially addressed in 24.2 release.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the bundle-gist-v2 branch 2 times, most recently from b2fc238 to ff865fe Compare November 23, 2024 02:19
This commit re-runs the execbuilder with the explain factory whenever
plan-gist matching happens. This allows us to fully populate `plan.txt`
contents of the bundle. Some care had to be taken to ensure that the new
plan is used going forward (for correct annotation with exec stats). We
also make a copy of the memo to be safe (so that the original memo isn't
mutated by the execbuilder).

Release note (bug fix): Previously, whenever CockroachDB collected
a statement bundle when plan-gist-based matching was used, `plan.txt`
file would be incomplete, and this is now fixed. The bug has been
present since introduction of plan-gist-based matching feature in 23.1
but was partially addressed in 24.2 release.
@yuzefovich yuzefovich changed the title WIP on re-running execbuilder for gist matching sql: rerun execbuilder for gist matching Nov 23, 2024
@yuzefovich yuzefovich marked this pull request as ready for review November 23, 2024 02:57
@yuzefovich yuzefovich requested a review from a team as a code owner November 23, 2024 02:57
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