-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
bugSomething isn't workingSomething isn't working
Description
There's a small race condition in BasicLifecycler where concurrent calls to updateInstance could cause a lost update if the ordering of calls changes after l.store.CAS and before updating l.currInstanceDesc. Some approaches for guarding against this are:
- Pessimistic - We can broaden the
currState.Lock()to include theCAScall. - Optimistic - We can store a
currVersionalong withcurrInstanceDesc, updateCASto return the new version, and only updatecurrInstanceDescif the new version is >currVersion.
We should also consider whether other methods that update l.currInstanceDesc should be similarly guarded.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working