Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lock] interoperate with Python client #19

Merged
merged 1 commit into from
Apr 13, 2020
Merged

[lock] interoperate with Python client #19

merged 1 commit into from
Apr 13, 2020

Conversation

pmazzini
Copy link

@pmazzini pmazzini commented Apr 8, 2020

I got the following error message while using the library:

strconv.Atoi: parsing \"640f65557dc046648b51a144f37fc95d__lock__0000196658\": invalid syntax"

Which led me to finding python-zk/kazoo#548.

Apparently the Go and Python client libraries use a different prefix and don't work well with each other.

I haven't tested the PR yet. I am putting it up for comments to see if it makes sense.

@pmazzini
Copy link
Author

pmazzini commented Apr 8, 2020

CI failures don't seem related:

Please provide an upload token from codecov.io with valid arguments

@pmazzini pmazzini changed the title [lock] make python and go clients be able to work together [lock] make python and go clients be able to interoperate Apr 8, 2020
@pmazzini pmazzini closed this Apr 9, 2020
@pmazzini pmazzini reopened this Apr 9, 2020
@pmazzini
Copy link
Author

pmazzini commented Apr 9, 2020

Ok I tested it.

Before:

strconv.Atoi: parsing "8b0a8288f9d544aab408fec25f331907__lock__0000000016": invalid syntax

After:

It properly waits for a lock.

Python client uses a different prefix:
https://github.com/python-zk/kazoo/blob/master/kazoo/recipe/lock.py#L109

@pmazzini pmazzini changed the title [lock] make python and go clients be able to interoperate [lock] interoperate with python client Apr 9, 2020
@yarikk
Copy link

yarikk commented Apr 9, 2020

Looks good – thanks for the fix, @pmazzini!

Could you please also add a unit test which would verify parseSeq against both cases.

@yarikk
Copy link

yarikk commented Apr 9, 2020

Registered #20 for the CI failures.

@pmazzini
Copy link
Author

pmazzini commented Apr 9, 2020

Could you please also add a unit test which would verify parseSeq against both cases.

Added :)

@yarikk
Copy link

yarikk commented Apr 9, 2020

lgtm - leaving for @nemith or @jeffbean to merge

@pmazzini pmazzini changed the title [lock] interoperate with python client [lock] interoperate with Python client Apr 9, 2020
@pmazzini
Copy link
Author

ping

@nemith nemith merged commit d69fe43 into go-zookeeper:master Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants