Commit 819d291b authored by Oran Agra's avatar Oran Agra
Browse files

Merge remote-tracking branch 'origin/unstable' into 7.2

parents a51eb05b 936cfa46
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
] ]
], ],
"command_flags": [ "command_flags": [
"LOADING",
"STALE" "STALE"
], ],
"command_tips": [ "command_tips": [
......
{ {
"PSUBSCRIBE": { "PSUBSCRIBE": {
"summary": "Listens for messages published to channels that match one or more patterns.", "summary": "Listens for messages published to channels that match one or more patterns.",
"complexity": "O(N) where N is the number of patterns the client is already subscribed to.", "complexity": "O(N) where N is the number of patterns to subscribe to.",
"group": "pubsub", "group": "pubsub",
"since": "2.0.0", "since": "2.0.0",
"arity": -2, "arity": -2,
......
{ {
"PUNSUBSCRIBE": { "PUNSUBSCRIBE": {
"summary": "Stops listening to messages published to channels that match one or more patterns.", "summary": "Stops listening to messages published to channels that match one or more patterns.",
"complexity": "O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).", "complexity": "O(N) where N is the number of patterns to unsubscribe.",
"group": "pubsub", "group": "pubsub",
"since": "2.0.0", "since": "2.0.0",
"arity": -1, "arity": -1,
......
{ {
"CONFIG": { "CONFIG": {
"summary": "Configures Redis Sentinel.", "summary": "Configures Redis Sentinel.",
"complexity": "O(1)", "complexity": "O(N) when N is the number of configuration parameters provided",
"group": "sentinel", "group": "sentinel",
"since": "6.2.0", "since": "6.2.0",
"arity": -4, "arity": -4,
"container": "SENTINEL", "container": "SENTINEL",
"function": "sentinelCommand", "function": "sentinelCommand",
"history": [
[
"7.2.0",
"Added the ability to set and get multiple parameters in one call."
]
],
"command_flags": [ "command_flags": [
"ADMIN", "ADMIN",
"SENTINEL", "SENTINEL",
...@@ -42,7 +48,7 @@ ...@@ -42,7 +48,7 @@
"type": "string" "type": "string"
}, },
"announce-port": { "announce-port": {
"type": "integer" "type": "string"
}, },
"sentinel-user": { "sentinel-user": {
"type": "string" "type": "string"
...@@ -64,6 +70,9 @@ ...@@ -64,6 +70,9 @@
{ {
"const": "warning" "const": "warning"
}, },
{
"const": "nothing"
},
{ {
"const": "unknown" "const": "unknown"
} }
...@@ -87,6 +96,7 @@ ...@@ -87,6 +96,7 @@
"name":"set", "name":"set",
"token":"SET", "token":"SET",
"type":"block", "type":"block",
"multiple": true,
"arguments":[ "arguments":[
{ {
"name":"parameter", "name":"parameter",
...@@ -101,7 +111,8 @@ ...@@ -101,7 +111,8 @@
{ {
"token":"GET", "token":"GET",
"name":"parameter", "name":"parameter",
"type":"string" "type":"string",
"multiple": true
} }
] ]
} }
......
{ {
"SUNSUBSCRIBE": { "SUNSUBSCRIBE": {
"summary": "Stops listening to messages posted to shard channels.", "summary": "Stops listening to messages posted to shard channels.",
"complexity": "O(N) where N is the number of clients already subscribed to a shard channel.", "complexity": "O(N) where N is the number of shard channels to unsubscribe.",
"group": "pubsub", "group": "pubsub",
"since": "7.0.0", "since": "7.0.0",
"arity": -1, "arity": -1,
......
{ {
"UNSUBSCRIBE": { "UNSUBSCRIBE": {
"summary": "Stops listening to messages posted to channels.", "summary": "Stops listening to messages posted to channels.",
"complexity": "O(N) where N is the number of clients already subscribed to a channel.", "complexity": "O(N) where N is the number of channels to unsubscribe.",
"group": "pubsub", "group": "pubsub",
"since": "2.0.0", "since": "2.0.0",
"arity": -1, "arity": -1,
......
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
}, },
{ {
"type": "integer", "type": "integer",
"description": "The rank of the member when 'WITHSCORES' is not used." "description": "The rank of the member when 'WITHSCORE' is not used."
}, },
{ {
"type": "array", "type": "array",
"description": "The rank and score of the member when 'WITHSCORES' is used.", "description": "The rank and score of the member when 'WITHSCORE' is used.",
"minItems": 2, "minItems": 2,
"maxItems": 2, "maxItems": 2,
"items": [ "items": [
......
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
}, },
{ {
"type": "integer", "type": "integer",
"description": "The rank of the member when 'WITHSCORES' is not used." "description": "The rank of the member when 'WITHSCORE' is not used."
}, },
{ {
"type": "array", "type": "array",
"description": "The rank and score of the member when 'WITHSCORES' is used.", "description": "The rank and score of the member when 'WITHSCORE' is used.",
"minItems": 2, "minItems": 2,
"maxItems": 2, "maxItems": 2,
"items": [ "items": [
......
This diff is collapsed.
...@@ -114,14 +114,15 @@ typedef struct ConnectionType { ...@@ -114,14 +114,15 @@ typedef struct ConnectionType {
struct connection { struct connection {
ConnectionType *type; ConnectionType *type;
ConnectionState state; ConnectionState state;
int last_errno;
int fd;
short int flags; short int flags;
short int refs; short int refs;
int last_errno; unsigned short int iovcnt;
void *private_data; void *private_data;
ConnectionCallbackFunc conn_handler; ConnectionCallbackFunc conn_handler;
ConnectionCallbackFunc write_handler; ConnectionCallbackFunc write_handler;
ConnectionCallbackFunc read_handler; ConnectionCallbackFunc read_handler;
int fd;
}; };
#define CONFIG_BINDADDR_MAX 16 #define CONFIG_BINDADDR_MAX 16
...@@ -445,4 +446,9 @@ int RedisRegisterConnectionTypeSocket(void); ...@@ -445,4 +446,9 @@ int RedisRegisterConnectionTypeSocket(void);
int RedisRegisterConnectionTypeUnix(void); int RedisRegisterConnectionTypeUnix(void);
int RedisRegisterConnectionTypeTLS(void); int RedisRegisterConnectionTypeTLS(void);
/* Return 1 if connection is using TLS protocol, 0 if otherwise. */
static inline int connIsTLS(connection *conn) {
return conn && conn->type == connectionTypeTls();
}
#endif /* __REDIS_CONNECTION_H */ #endif /* __REDIS_CONNECTION_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -210,7 +210,7 @@ void dictReleaseIterator(dictIterator *iter); ...@@ -210,7 +210,7 @@ void dictReleaseIterator(dictIterator *iter);
dictEntry *dictGetRandomKey(dict *d); dictEntry *dictGetRandomKey(dict *d);
dictEntry *dictGetFairRandomKey(dict *d); dictEntry *dictGetFairRandomKey(dict *d);
unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count); unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count);
void dictGetStats(char *buf, size_t bufsize, dict *d); void dictGetStats(char *buf, size_t bufsize, dict *d, int full);
uint64_t dictGenHashFunction(const void *key, size_t len); uint64_t dictGenHashFunction(const void *key, size_t len);
uint64_t dictGenCaseHashFunction(const unsigned char *buf, size_t len); uint64_t dictGenCaseHashFunction(const unsigned char *buf, size_t len);
void dictEmpty(dict *d, void(callback)(dict*)); void dictEmpty(dict *d, void(callback)(dict*));
......
...@@ -80,7 +80,7 @@ unsigned int getLRUClock(void) { ...@@ -80,7 +80,7 @@ unsigned int getLRUClock(void) {
unsigned int LRU_CLOCK(void) { unsigned int LRU_CLOCK(void) {
unsigned int lruclock; unsigned int lruclock;
if (1000/server.hz <= LRU_CLOCK_RESOLUTION) { if (1000/server.hz <= LRU_CLOCK_RESOLUTION) {
atomicGet(server.lruclock,lruclock); lruclock = server.lruclock;
} else { } else {
lruclock = getLRUClock(); lruclock = getLRUClock();
} }
......
...@@ -490,7 +490,7 @@ void geoaddCommand(client *c) { ...@@ -490,7 +490,7 @@ void geoaddCommand(client *c) {
GeoHashBits hash; GeoHashBits hash;
geohashEncodeWGS84(xy[0], xy[1], GEO_STEP_MAX, &hash); geohashEncodeWGS84(xy[0], xy[1], GEO_STEP_MAX, &hash);
GeoHashFix52Bits bits = geohashAlign52Bits(hash); GeoHashFix52Bits bits = geohashAlign52Bits(hash);
robj *score = createObject(OBJ_STRING, sdsfromlonglong(bits)); robj *score = createStringObjectFromLongLongWithSds(bits);
robj *val = c->argv[longidx + i * 3 + 2]; robj *val = c->argv[longidx + i * 3 + 2];
argv[longidx+i*2] = score; argv[longidx+i*2] = score;
argv[longidx+1+i*2] = val; argv[longidx+1+i*2] = val;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment