-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage: unable to rebalance away from lease holder #9462
Description
The allocator heuristics currently disallow rebalancing away from the lease holder for a range. This can cause significant imbalances when a single node holds the range lease for a significant fraction of the ranges in a cluster. As long as those ranges are accessed frequently we'll keep extending the lease.
Now that we have the ability to transfer leases between nodes we should investigate having the replicateQueue transfer its lease to another replica when it encounters a range it wants to remove itself from. Note that replicateQueue only has to transfer lease. The new lease holder node will take care of performing the removal.
The big risk in implementing this is that the lease transfer mechanism is currently not used in production, only in testing. Are there any concerns with that code?
Cc @cockroachdb/stability