Skip to content

db: respect changed filters in SetOptions#1631

Merged
jbowens merged 1 commit intocockroachdb:masterfrom
jbowens:set-options-fix
Apr 6, 2022
Merged

db: respect changed filters in SetOptions#1631
jbowens merged 1 commit intocockroachdb:masterfrom
jbowens:set-options-fix

Conversation

@jbowens
Copy link
Copy Markdown
Contributor

@jbowens jbowens commented Apr 6, 2022

Rebuild the iterator stack if filters (block or table) are modified.

Fix #1621.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Rebuild the iterator stack if filters (block or table) are modified.

Fix cockroachdb#1621.
Copy link
Copy Markdown
Contributor

@nicktrav nicktrav left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 4 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jbowens)


iterator.go, line 1751 at r2 (raw file):

compare the filter closures.

Function pointer comparison as a high level check? It's a little gross though.

@jbowens jbowens requested a review from erikgrinaker April 6, 2022 16:43
Copy link
Copy Markdown
Contributor Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

TFTR!

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @erikgrinaker and @nicktrav)


iterator.go, line 1751 at r2 (raw file):

Previously, nicktrav (Nick Travers) wrote…

compare the filter closures.

Function pointer comparison as a high level check? It's a little gross though.

I'm hoping we can remove the TableFilter altogether soon, replacing it exclusively with block property filters. They're subject to a similar problem, but I suppose we could add an equal method to the interface.

@jbowens jbowens merged commit 5cd6064 into cockroachdb:master Apr 6, 2022
@jbowens jbowens deleted the set-options-fix branch April 6, 2022 23:50
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.

db: SetOptions doesn't always respect changed filters

3 participants