Service::drain_node and Service::fill_node both use a ScheduleContext in an attempt
to spread out shards belonging to the same tenant. However, they're not resetting the
schedule context after processing each tenant.
Summary of changes
Reset the scheduling context after each tenant. We are using the fact that the shards inServiceState::tenants
are already ordered by tenant id.
Checklist before requesting a review
[ ] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.
[ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
[ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.
Checklist before merging
[ ] Do not forget to reformat commit message to not include the above checklist
Problem
Service::drain_node
andService::fill_node
both use aScheduleContext
in an attempt to spread out shards belonging to the same tenant. However, they're not resetting the schedule context after processing each tenant.Summary of changes
Reset the scheduling context after each tenant. We are using the fact that the shards in
ServiceState::tenants
are already ordered by tenant id.Checklist before requesting a review
Checklist before merging