Skip to content

kv: don't unquiesce on read-only requests#125661

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/maybeUnquiesce
Jun 14, 2024
Merged

kv: don't unquiesce on read-only requests#125661
craig[bot] merged 1 commit intocockroachdb:masterfrom
nvb:nvanbenschoten/maybeUnquiesce

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Jun 13, 2024

This commit fixes a mistake in #104657, where we switched a call on the request path from maybeInitializeRaftGroup to maybeUnquiesce. As a result, we were unquiescing ranges whenver they saw any read or write traffic. We need to unquiesce on writes, but not on reads.

This was probably not having much of an effect because the leader would usually evaluate this call and skip the "wake leader" and "may campaign" actions, but it would still start ticking until it decided to quiesce again, which is unnecessary.

Even though this was a regression, I don't intend to backport this patch because it feels risky and the regression seems mostly harmless in practice.

Epic: None
Release notes: None

@nvb nvb requested a review from arulajmani June 13, 2024 21:31
@nvb nvb requested a review from a team as a code owner June 13, 2024 21:31
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Jun 13, 2024

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

@arulajmani arulajmani 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 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)

This commit fixes a mistake in cockroachdb#104657, where we switched a call on the
request path from `maybeInitializeRaftGroup` to `maybeUnquiesce`. As a
result, we were unquiescing ranges whenver they saw any read or write
traffic. We need to unquiesce on writes, but not on reads.

This was probably not having much of an effect because the leader would
usually evaluate this call and skip the "wake leader" and "may campaign"
actions, but it would still start ticking until it decided to quiesce
again, which is unnecessary.

Even though this was a regression, I don't intend to backport this patch
because it feels risky and the regression seems mostly harmless in practice.

Release notes: None
@nvb nvb force-pushed the nvanbenschoten/maybeUnquiesce branch from 07a9e68 to adbf97c Compare June 14, 2024 16:03
@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Jun 14, 2024

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 14, 2024

@craig craig bot merged commit e6d22a8 into cockroachdb:master Jun 14, 2024
@nvb nvb deleted the nvanbenschoten/maybeUnquiesce branch June 24, 2024 15:35
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