Hello all,
we have a problem using distributed locks on a clustered vert.x application. We use distributed locks from vert.x, that are backed by hazelcast semaphores. For every Item that passes our system we create a new distributed lock and after the item is processed,
the lock is no longer needed.
We observe that the SemaphoreProxy-instance does not seem to be deleted, if the corresponding semaphore itself is removed, so over time there are a lot of them in the cluster that do not seem to have any particular use but use memory (memory leak).
Currently we have implemented a method that removes those stale instances, but that does look like a clumsy workaround.
We have the following questions:
- Why is vert.x using semaphores and not locks for that particular use?
- Do locks have the same problem (we did not try that until now, but if not, it might be an easy fix)?
- Does anybody know, how to have the SemaphoreProxy-Instances automatically removed after the locks are no longer used?
Thx
Jan Fengler