arvenil/mutex

Mutex signals are not preventing concurrent duplicates

manuelbcd opened this issue · 2 comments

Hi. I'm trying ninja-mutex with redis. The execution infrastructure is AWS with elasticache.
Four cron docker containers acquire mutex signal in order to prevent duplicates (to work like in a queue). I mean: two instances cannot process the same object from db because they are creating mutexes with the object ids.

In local environment it works well emulating concurrency with tools like "parallel" from shell. But in AWS environment it is not working well concurrently... duplicate objects are created.

Am I missing something? may I to implement a more advanced locking mechanism like the one described by redis.io? (https://redis.io/topics/distlock)

Thanks in advance

just to add information, I have tested within elasticache and the redis locks are written and released with success.

Hi again. I have solved the problem by changing to another library implementing distributed lock algorithm recommended by redis:

https://redis.io/topics/distlock

Thank you very much