python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 387 forks source link

Zookeeper python client cannot work with go client when using lock #548

Closed yangyadi1993 closed 8 months ago

yangyadi1993 commented 5 years ago

We are using zookeeper Go client and Python client in different pod in kubernetes but using the same zookeeper infrastructure. Two pods are trying to use a lock with the same path. But the znode created by Python and Go have very different prefix and thus I think zookeeper somehow failed to figure out which is smaller so the lock was not implemented correctly.

As the result, they cannot lock each other and work properly.

_c_38553bd6d1d57f710ae70ddcc3d24715-lock-0000000000 # Go lock
da5719988c244fc793f49ec3aa29b566__lock__0000000003 # Python lock

Is there anything I could do to get Go client working with Python client?

StephenSorriaux commented 8 months ago

Fixed by https://github.com/python-zk/kazoo/pull/599