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

tablemetadatacache: cleanup batch iterator query #139349

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xinhaoz
Copy link
Member

@xinhaoz xinhaoz commented Jan 17, 2025

Please note only the latest commit is for review.

This commit removes the CTE in the table metadata batch iterator
as it does not provide much value.

Epic: none

Release note: None

When scanning `system.namespace` entries for the table metadata
update job, we were using LEFT JOIN to join parent and schema ids
in system.namespace entries with their `name` column, also in
system.namespace. It's seemingly possible that unknown schema failures
can put us in a state where there may not be name entries for all
schema ids present in `system.namespace`. This leads to `NULL` results for
schemaName and cols, something the  results handler  was not anticipating.
These should really be inner joins since we cannot fetch stats for any
entries unable  provide a fully qualified name.

Epic: none
Fixes: cockroachdb#139293

Release note: None
This commit removes the CTE in the table metadata batch iterator
as it does not provide much value.

Epic: none

Release note: None
@xinhaoz xinhaoz requested a review from a team as a code owner January 17, 2025 17:20
@xinhaoz xinhaoz requested review from kyle-a-wong and removed request for a team January 17, 2025 17:20
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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