You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This imposes a constraint on other programs using the lock key to coordinate access to a resource, namely to use the same prefix in front of the key. This is very inconvenient since existing code needs to be changed to adapt to this requirement.
Moreover, the use of the prefix is not documented (I discovered it by looking at the content of the Redis servers).
Is there a way to use the Redlock without imposing a specific prefix? Ideally, if a prefix is added, it should be a parameter when creating the Redlock object.
The text was updated successfully, but these errors were encountered:
In the current version of your code, the prefix "redlock:" is systematically added to any Redlock lock key created with:
object_lock = Redlock(key=lock_key, masters={redis_1, redis_2, redis_3}, auto_release_time=20)
This imposes a constraint on other programs using the lock key to coordinate access to a resource, namely to use the same prefix in front of the key. This is very inconvenient since existing code needs to be changed to adapt to this requirement.
Moreover, the use of the prefix is not documented (I discovered it by looking at the content of the Redis servers).
Is there a way to use the Redlock without imposing a specific prefix? Ideally, if a prefix is added, it should be a parameter when creating the Redlock object.
The text was updated successfully, but these errors were encountered: