Closed as not planned
Description
Description
Add a lock class, not depends on leader election.
Usage high level guideline:
try {
lock.lock(timeout); // blocking
doSomeAction();
} finally {
lock.unlock();
}
Use cases
Actions which require distributed lock.
Solution suggestion
implementation details - high level
- lock:
- try to creates a lease.
- if already exists, wait and try again until created, or timeout reached.
- unlock:
- delete the lease.
Note that I have this implementation ready, so if confirmed, I can try opening a PR for it at extended module.
Would appreciate feedback on proceeding with it.