Skip to content

sql: return droppedView instead of nil#97802

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
chengxiong-ruan:return-dropped-view-instead-of-nil
Feb 28, 2023
Merged

sql: return droppedView instead of nil#97802
craig[bot] merged 1 commit intocockroachdb:masterfrom
chengxiong-ruan:return-dropped-view-instead-of-nil

Conversation

@chengxiong-ruan
Copy link
Copy Markdown
Contributor

In #97631 we refactor the method to drorp index and column cascade dependents. But we didn't return a correct droppedViews for event logging, instead, we returned a nil. This wasn't caught by the event_log logic test because we local-legacy-schema-changer test config. Though this was caught when backporting to v22.2 because there was a fallback.

Epic: None

Release note: None

@chengxiong-ruan chengxiong-ruan requested a review from a team February 28, 2023 18:59
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Feb 28, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

Add some coverage for this?

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @chengxiong-ruan)


-- commits line 4 at r1:
nit: drop

@chengxiong-ruan
Copy link
Copy Markdown
Contributor Author

Yeah, I was about to ask here. How do you feel like adding a new test file? The event_log skips the whole legacy schema changer. I think we could just copy the whole file but rewrite it for legacy schema changer setting.

@fqazi
Copy link
Copy Markdown
Collaborator

fqazi commented Feb 28, 2023

Yeah, I was about to ask here. How do you feel like adding a new test file? The event_log skips the whole legacy schema changer. I think we could just copy the whole file but rewrite it for legacy schema changer setting.

I think that makes sense for coverage

@chengxiong-ruan chengxiong-ruan force-pushed the return-dropped-view-instead-of-nil branch from 11fee10 to d027c9c Compare February 28, 2023 19:29
Copy link
Copy Markdown
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

New logictest looks good, thanks for doing this.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @chengxiong-ruan)

In cockroachdb#97631 we refactor the method to drorp index and column
cascade dependents. But we didn't return a correct droppedViews,
instead, we returned a nil. This wasn't caught by the `event_log`
logic test because we skip `local-legacy-schema-changer` test config
in v23.1. Luckily,this was caught when backporting to v22.2 because
there was a fallback.

Epic: None

Release note: None
@chengxiong-ruan chengxiong-ruan force-pushed the return-dropped-view-instead-of-nil branch from d027c9c to 75a70c1 Compare February 28, 2023 21:39
@chengxiong-ruan
Copy link
Copy Markdown
Contributor Author

TFTR!
bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 28, 2023

Build succeeded:

@craig craig bot merged commit 27fcfd3 into cockroachdb:master Feb 28, 2023
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