From bfb18e55199788c8851ba77cdcbf1d53af98bbf4 Mon Sep 17 00:00:00 2001 From: "bodong.ybd" Date: Thu, 12 Mar 2020 11:12:37 +0800 Subject: [PATCH 1/5] Remove duplicate obj files in Makefile --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 00b623a4b..bbfb06440 100644 --- a/src/Makefile +++ b/src/Makefile @@ -208,9 +208,9 @@ REDIS_SERVER_NAME=redis-server REDIS_SENTINEL_NAME=redis-sentinel REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o gopher.o tracking.o connection.o tls.o sha256.o REDIS_CLI_NAME=redis-cli -REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o siphash.o crc16.o +REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o crc64.o siphash.o crc16.o REDIS_BENCHMARK_NAME=redis-benchmark -REDIS_BENCHMARK_OBJ=ae.o anet.o redis-benchmark.o adlist.o dict.o zmalloc.o siphash.o redis-benchmark.o +REDIS_BENCHMARK_OBJ=ae.o anet.o redis-benchmark.o adlist.o dict.o zmalloc.o siphash.o REDIS_CHECK_RDB_NAME=redis-check-rdb REDIS_CHECK_AOF_NAME=redis-check-aof From dc8885a1ca025a2a10064d14d242c6125bf96342 Mon Sep 17 00:00:00 2001 From: Itamar Haber Date: Wed, 11 Mar 2020 18:43:03 +0200 Subject: [PATCH 2/5] Adds keyspace notifications to migrate and restore --- src/cluster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index c05e46f76..5f63d2b8f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -4981,6 +4981,7 @@ void restoreCommand(client *c) { } objectSetLRUOrLFU(obj,lfu_freq,lru_idle,lru_clock,1000); signalModifiedKey(c->db,c->argv[1]); + notifyKeyspaceEvent(NOTIFY_GENERIC,"restore",c->argv[1],c->db->id); addReply(c,shared.ok); server.dirty++; } @@ -5327,6 +5328,7 @@ try_again: /* No COPY option: remove the local key, signal the change. */ dbDelete(c->db,kv[j]); signalModifiedKey(c->db,kv[j]); + notifyKeyspaceEvent(NOTIFY_GENERIC,"del",kv[j],c->db->id); server.dirty++; /* Populate the argument vector to replace the old one. */ @@ -5489,7 +5491,7 @@ void readwriteCommand(client *c) { * already "down" but it is fragile to rely on the update of the global state, * so we also handle it here. * - * CLUSTER_REDIR_DOWN_STATE and CLUSTER_REDIR_DOWN_RO_STATE if the cluster is + * CLUSTER_REDIR_DOWN_STATE and CLUSTER_REDIR_DOWN_RO_STATE if the cluster is * down but the user attempts to execute a command that addresses one or more keys. */ clusterNode *getNodeByQuery(client *c, struct redisCommand *cmd, robj **argv, int argc, int *hashslot, int *error_code) { clusterNode *n = NULL; From da14982d1ed8a1f2719f9206be8b8105db22745b Mon Sep 17 00:00:00 2001 From: guodongxiaren <879231132@qq.com> Date: Sat, 7 Mar 2020 19:38:27 +0800 Subject: [PATCH 3/5] string literal should be const char* --- src/asciilogo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asciilogo.h b/src/asciilogo.h index 83c538b54..044ca0c55 100644 --- a/src/asciilogo.h +++ b/src/asciilogo.h @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -char *ascii_logo = +const char *ascii_logo = " _._ \n" " _.-``__ ''-._ \n" " _.-`` `. `_. ''-._ Redis %s (%s/%d) %s bit\n" From 5d4c4df3efa4009035ba28329195d4e1378f97ba Mon Sep 17 00:00:00 2001 From: chendianqiang Date: Sat, 22 Feb 2020 15:03:01 +0800 Subject: [PATCH 4/5] use correct list for moduleUnregisterUsedAPI --- src/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module.c b/src/module.c index bbd54082c..74da6c24d 100644 --- a/src/module.c +++ b/src/module.c @@ -6234,7 +6234,7 @@ int moduleUnregisterUsedAPI(RedisModule *module) { RedisModule *used = ln->value; listNode *ln = listSearchKey(used->usedby,module); if (ln) { - listDelNode(module->using,ln); + listDelNode(used->usedby,ln); count++; } } From e628f94436f2ffb38dd6305f18956f309838a8d6 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 13 Mar 2020 16:21:55 +0100 Subject: [PATCH 5/5] Restore newline at the end of redis-cli.c --- src/redis-cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index b44db9a1e..7ad80c0a1 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -8062,4 +8062,5 @@ int main(int argc, char **argv) { } else { return noninteractive(argc,convertToSds(argc,argv)); } -} \ No newline at end of file +} +