salimane / rediscluster-py

a Python interface to a Cluster of Redis key-value store
MIT License
47 stars 17 forks source link

MULTI/Pipeline Not Supported #1

Closed woozyking closed 9 years ago

woozyking commented 11 years ago

When I try to do Pipeline operations, cluster_client throws an error, see Traceback below:

Traceback (most recent call last):
  File "...", line 370, in <module>
    c.multi()
  File "/usr/local/lib/python2.7/dist-packages/rediscluster/cluster_client.py", line 168, in function
    if isinstance(args[0], (basestring, bytes)):
IndexError: tuple index out of range

Where c is an instance of rediscluster.StrictRedisCluster.

woozyking commented 11 years ago

This was originally tested under: Ubuntu 12.10 Python 2.7.3 Redis 2.2.12 rediscluster 0.4.0

The problem still persists in 0.5.0

salimane commented 11 years ago

this is currently not supported because of the cluster environment. I'm still checking if I can abstract it in the library. Thanks

woozyking commented 11 years ago

Thank you very much!

woozyking commented 11 years ago

From Nydus I found a solution, and I implemented a way to do sorted set union/intersection operations with the aggregation part done in Python. They could be optimized as the algorithm was done to showcase the functionality only.

Check Nydus out since they do have a mechanism to support multi/pipeline, as well as my gist for sorted set union/intersection solution https://gist.github.com/woozyking/07db9ec24fd31ea6e65c

salimane commented 11 years ago

ok I'll check them out. Thanks

yee379 commented 10 years ago

any update on pipeline support?

salimane commented 10 years ago

@yee379 I've checked a bit some solutions, but I haven't found one that can work. A pull request on this is definitely welcomed. Thanks