RaftLease should update the database in batches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
I just did a load test bringing up thousands of leases and then dropping the connections.
Raft itself seemed happy to handle that load in 2.5.1. However, it took a very long time for db.leaseholders
We'd have to change something like NotifyTarget so that it could be passed a list of "all of these are expiring".
A different option is that we don't really have to ever delete the lease holder from the database. That might introduce a race condition, if the old leader doesn't know it is deposed, and the new leader is told that it should take over, but raft hasn't updated the database yet.
But if we don't tell the new leader is the leader until we've updated Mongo, that should be ok.
This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.