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/physicalplan: small refactor #49769

Merged
merged 2 commits into from
Jun 1, 2020

Conversation

andreimatei
Copy link
Contributor

This patch lifts the concern about consistently resolving spans from a
single range to the same node up to the spanResolver, from one of the
replica oracles. Regardless of what oracle is used (i.e. the
lease-holder aware one, or the follower-reads one), making a single node
in charge of all the spans that fall within one range seems like a good
idea. Currently only the leaseholder oracle was doing this.
This makes SpanResolver.ReplicaInfo() idempotent.

This patch lifts the concern about consistently resolving spans from a
single range to the same node up to the spanResolver, from one of the
replica oracles. Regardless of what oracle is used (i.e. the
lease-holder aware one, or the follower-reads one), making a single node
in charge of all the spans that fall within one range seems like a good
idea. Currently only the leaseholder oracle was doing this.
This makes SpanResolver.ReplicaInfo() idempotent.

Release note: None
We were sleeping to deal with range cache clobbering, but we no longer
have these clobbering problems since cache updates are now resistant to
stale information overwiting newer one.

Release note: None
@andreimatei andreimatei requested a review from ajwerner June 1, 2020 19:30
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@ajwerner ajwerner 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 3 files at r1, 1 of 1 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@craig
Copy link
Contributor

craig bot commented Jun 1, 2020

Build succeeded

@craig craig bot merged commit daf0418 into cockroachdb:master Jun 1, 2020
@andreimatei andreimatei deleted the range-cache.oracles-cleanup branch June 1, 2020 23:14
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