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

Pipeline Issues (python client) #49

Closed
owaaa opened this issue Sep 7, 2016 · 5 comments
Closed

Pipeline Issues (python client) #49

owaaa opened this issue Sep 7, 2016 · 5 comments

Comments

@owaaa
Copy link

owaaa commented Sep 7, 2016

I haven't been able to get pipelines to work (using Python Client). In #14 it appears that this should be supported?

My code looks something like

pipe = self.r.pipeline()
        for item in items:
            id = item['id']
            geojson = item['geometry']
            pipe.execute_command("set", "key", id, "object", geojson)
pipe.execute()

Tile38 reports [ERRO] Protocol error: unbalanced quotes in request

Thoughts?

Redis client is redis==2.10.5

Individual execute_commands directly against the client, "non-pipelined" work great, I just want to speed up bulk loads. Thanks

@tidwall
Copy link
Owner

tidwall commented Sep 7, 2016

I would like to reproduce this issue on my side.

About how many messages are your sending at one time? And roughly how large is each geojson?

@owaaa
Copy link
Author

owaaa commented Sep 8, 2016

I had about 1000 set commands. I tried batching to a low number (10) but having a different issue now. The call to pipe.execute() hangs on the very first attempt and never returns. I'm not sure if this is an issue with the python redis client or if something else is going on. I also tried turning off transaction for the pipeline

@tidwall
Copy link
Owner

tidwall commented Sep 8, 2016

I think I found the issue. I'm working up a fix now and I'll keep you posted.

@tidwall tidwall closed this as completed in 6d944ad Sep 8, 2016
@tidwall
Copy link
Owner

tidwall commented Sep 8, 2016

I found the issue and pushed an update to the master branch. If possible, please verify on your side. Pipelining should be working now.

Please note that Tile38 does not support the MULTI command, which is how Redis handles transactions. Make sure that transactions are disabled with your client.

@owaaa
Copy link
Author

owaaa commented Sep 9, 2016

I verified via the master branch. Thanks!

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

No branches or pull requests

2 participants