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

rework tabletbalancer interface to avoid unnecessary sort #443

Closed
wants to merge 4 commits into from

Conversation

demmer
Copy link
Collaborator

@demmer demmer commented Jul 8, 2024

Description

Rework the tabletbalancer interface to avoid an unnecessary sort.

There's actually no need in the tabletgateway to ever sort the full list of potential tablet candidates, because each query attempt only goes to a single tablet, and then if that fails, the withRetry loop records which tablet failed and then re-enters the loop to try again.

Therefore, refactor the balancer to replace ShuffleTablets with a simple Pick interface that just returns the best tablet to route to.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

@demmer demmer requested a review from a team as a code owner July 8, 2024 19:06
@demmer demmer force-pushed the tabletbalancer-pick-one branch 2 times, most recently from 6021332 to 577377d Compare July 8, 2024 19:15
demmer added 2 commits July 8, 2024 12:51
There's actually no need in the tabletgateway to ever sort the full list of
potential tablet candidates, because each query attempt only goes to a single
tablet, and then if that fails, the withRetry loop records which tablet failed
and then re-enters the loop to try again.

Therefore, refactor the balancer to replace ShuffleTablets with a simple Pick
interface that just returns the best tablet to route to.
@demmer demmer force-pushed the tabletbalancer-pick-one branch from 577377d to 308d7c8 Compare July 8, 2024 19:51
Copy link

github-actions bot commented Aug 8, 2024

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label Aug 8, 2024
Copy link

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants