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

replica_rac2: rm Ready scheduling on piggybacked #130585

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

pav-kv
Copy link
Collaborator

@pav-kv pav-kv commented Sep 12, 2024

Since the piggybacked admitted vectors are applied immediately from within the method that clears the queued updates, we no longer need to schedule a Ready cycle. Previously the token release would happen subsequently in Ready handler.

Related to #129508

@pav-kv pav-kv requested review from a team as code owners September 12, 2024 17:40
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@pav-kv
Copy link
Collaborator Author

pav-kv commented Sep 12, 2024

@sumeerbhola Alternatively (if, in this flow, Ready scheduling is still necessary for something), let's document why it's needed. Do you know if it's needed? My understanding is that it was only necessary for applying the admitted vector updates.

@pav-kv
Copy link
Collaborator Author

pav-kv commented Sep 12, 2024

@sumeerbhola Do we need this Ready scheduling so that the token release gets acted on (e.g. send-queue sends some MsgApps)? Or that part is also independent and will notice the token release on its own? E.g. if I understand correctly, AdmitForEval will notice the release without a Ready, but I'm not sure about send-queue.

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

With the send-queue we will simply return the tokens, and if there is a send-queue we will already be waiting to be notified when tokens are available. That notification will happen on a separate goroutine, and then we will schedule processing on the raft scheduler (it was called ScheduleControllerEvent in the prototype). So we don't need this ready processing.

:lgtm:

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

Since the piggybacked admitted vectors are applied immediately from
within the method that clears the queued updates, we no longer need to
schedule a Ready cycle. Previously the token release would happen
subsequently in Ready handler.

Epic: none
Release note: none
@pav-kv
Copy link
Collaborator Author

pav-kv commented Sep 12, 2024

bors r=sumeerbhola

@craig craig bot merged commit a463cb3 into cockroachdb:master Sep 12, 2024
22 of 23 checks passed
@pav-kv pav-kv deleted the dont-ready-on-piggybacked branch September 12, 2024 21:58
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