[CURATOR-230] Get remaining semaphore count upon lease acquisition
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
I'm using Curator to help generate IDs in a distributed environment. My IDs are pretty typical: 64 bits with three components: timestamp, worker, count. The worker component comes from a Curator DistributedAtomicNumber modulo the max number of workers. To make sure that at any given time the number of workers don't exceed the max number of workers, each worker needs to take an InterProcessSemaphoreV2 before it gets its worker ID. There are some inherent issues with this method, but it's serving me fine at the moment. However, it seems that this use-case could be made entirely much simpler if I could just get a lease count upon acquiring an InterProcessSemaphoreV2. Would this be possible? Thank you.
---
Originally reported by dminkovsky, imported from: Get remaining semaphore count upon lease acquisition
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.