File: commands.rst

package info (click to toggle)
redis-py-cluster 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 592 kB
  • ctags: 781
  • sloc: python: 4,608; ruby: 1,045; makefile: 542
file content (126 lines) | stat: -rw-r--r-- 2,945 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
Implemented commands
====================

This will describe all changes that StrictRedisCluster have done to make a command to work in a cluster environment.

If a command is not listed here then the default implementation from `StrictRedis` in the `redis-py` library is used.



Fanout Commands
---------------

The following commands will send the same request to all nodes in the cluster. Results is returned as a dict with k,v pair (NodeID, Result).

 - bgrewriteaof
 - bgsave
 - client_getname
 - client_kill
 - client_list
 - client_setname
 - config_get
 - config_resetstat
 - config_rewrite
 - config_set
 - dbsize
 - echo
 - info
 - lastsave
 - ping
 - save
 - slowlog_get
 - slowlog_len
 - slowlog_reset
 - time

This command will send the same request to all nodes in the cluster in sequence. Results is appended to a unified list.

 - keys

The following commands will only be send to the master nodes in the cluster. Results is returned as a dict with k,v pair (NodeID, Command-Result).

 - flushall
 - flushdb
 - scan

This command will sent to a random node in the cluster.

 - publish

The following commands will be sent to the server that matches the first key.

 - eval
 - evalsha

This following commands will be sent to the master nodes in the cluster.

- script load - the result is the hash of loaded script
- script flush - the result is `True` if the command succeeds on all master nodes, else `False`
- script exists - the result is an array of booleans. An entry is `True` only if the script exists on all the master nodes.

The following commands will be sent to the sever that matches the specefied key.

 - hscan
 - hscan_iter
 - scan_iter
 - sscan
 - sscan_iter
 - zscan
 - zscan_iter



Blocked commands
----------------

The following commands is blocked from use.

Either because they do not work, there is no working implementation or it is not good to use them within a cluster.

 - bitop - Currently to hard to implement a solution in python space
 - client_setname - Not yet implemented
 - move - It is not possible to move a key from one db to another in cluster mode
 - restore
 - script_kill - Not yet implemented
 - sentinel
 - sentinel_get_master_addr_by_name
 - sentinel_master
 - sentinel_masters
 - sentinel_monitor
 - sentinel_remove
 - sentinel_sentinels
 - sentinel_set
 - sentinel_slaves
 - shutdown
 - slaveof - Cluster management should be done via redis-trib.rb manually
 - unwatch - Not yet implemented
 - watch - Not yet implemented



Overridden methods
------------------

The following methods is overridden from StrictRedis with a custom implementation.

They can operate on keys that exists in different hashslots and require a client side implementation to work.

 - brpoplpus
 - mget
 - mset
 - msetnx
 - pfmerge
 - randomkey
 - rename
 - renamenx
 - rpoplpush
 - sdiff
 - sdiffstore
 - sinter
 - sinterstore
 - smove
 - sort
 - sunion
 - sunionstore
 - zinterstore
 - zunionstore