-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Locking in ringpop-go is too granular, and is giving us headaches:
- There are many module-level and datastructure-level locks which are difficult to reason about. That makes it difficult to refactor anything that changes way the critical sections are locked, and is hard to do right without adding new race conditions or deadlocks (ask @motiejus).
- When we need to fix a race condition that we know about, to avoid (1), we fall back into adding yet another lock. For example, see Fix race in membership and ring consistency #112.
To fix this, we agreed to do the following:
- Make locking much more coarse: ideally, only one lock in Ringpop. The lock would be acquired when ringpop code is entered via API or network call (and released when a network call is made). That way we would know that whenever ringpop is mutating or reading its state, the lock is locked.
- Remove all the other locks.
- Win!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels