Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/xredis-gtid
Submodule xredis-gtid updated 49 files
+2 −0 .gitignore
+10 −5 Makefile
+107 −14 gtid.c
+173 −0 gtid_skiplist.c
+1,047 −2 gtid_test.c
+85 −1 include/gtid.h
+65 −0 utils/generate_cmdparse_commands.py
+4 −0 xredis/commands/geoadd.json
+4 −0 xredis/commands/geodist.json
+4 −0 xredis/commands/geohash.json
+4 −0 xredis/commands/geopos.json
+4 −0 xredis/commands/hdel.json
+4 −0 xredis/commands/hexists.json
+4 −0 xredis/commands/hget.json
+4 −0 xredis/commands/hincrby.json
+4 −0 xredis/commands/hincrbyfloat.json
+4 −0 xredis/commands/hmget.json
+4 −0 xredis/commands/hmset.json
+4 −0 xredis/commands/hset.json
+4 −0 xredis/commands/hsetnx.json
+4 −0 xredis/commands/hstrlen.json
+4 −0 xredis/commands/sadd.json
+4 −0 xredis/commands/sismember.json
+4 −0 xredis/commands/smismember.json
+4 −0 xredis/commands/srem.json
+4 −0 xredis/commands/zadd.json
+4 −0 xredis/commands/zincrby.json
+4 −0 xredis/commands/zmscore.json
+4 −0 xredis/commands/zrem.json
+4 −0 xredis/commands/zscore.json
+8 −0 xredis/redis_gtid_6x.h
+12 −0 xredis/redis_gtid_8x.h
+734 −0 xredis/tests/gtid/gaplog.tcl
+372 −0 xredis/tests/gtid/gaplog_commands.tcl
+780 −0 xredis/tests/gtid/gaplog_write_commands.tcl
+1 −1 xredis/tests/gtid/xsync.tcl
+70 −7 xredis/tests/support/gtid.tcl
+171 −56 xredis/xredis_gtid.c
+130 −21 xredis/xredis_gtid.h
+64 −0 xredis/xredis_gtid_adaptation_version.h
+325 −0 xredis/xredis_gtid_adaptation_version_6x.c
+345 −0 xredis/xredis_gtid_adaptation_version_8x.c
+0 −110 xredis/xredis_gtid_aof.c
+120 −0 xredis/xredis_gtid_cmdparse.c
+57 −0 xredis/xredis_gtid_cmdparse.h
+1,225 −0 xredis/xredis_gtid_gap_log.c
+1 −0 xredis/xredis_gtid_rdb.c
+71 −166 xredis/xredis_gtid_repl.c
+30 −60 xredis/xredis_gtid_rs.c
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ FINAL_LIBS += -lsnappy -lz -lstdc++
endif

# Include paths to dependencies
FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -I../deps/fast_float -I../deps/xredis-gtid/include
FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/fpconv -I../deps/fast_float -I../deps/xredis-gtid/include -I../deps/xredis-gtid/xredis
ifdef SWAP
FINAL_CFLAGS+= -I../deps/tdigest -I../deps/rocksdb/include
endif
Expand Down Expand Up @@ -395,7 +395,7 @@ endif

REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX)
REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX)
REDIS_SERVER_OBJ=threads_mngr.o memory_prefetch.o adlist.o quicklist.o ae.o anet.o dict.o ebuckets.o eventnotifier.o iothread.o mstr.o kvstore.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 cluster_legacy.o cluster_slot_stats.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crccombine.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 lolwut8.o acl.o tracking.o socket.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o connection.o unix.o logreqres.o xredis_gtid.o xredis_gtid_aof.o xredis_gtid_repl.o xredis_gtid_rs.o xredis_gtid_rdb.o ctrip_heartbeat.o ctrip.o
REDIS_SERVER_OBJ=threads_mngr.o memory_prefetch.o adlist.o quicklist.o ae.o anet.o dict.o ebuckets.o eventnotifier.o iothread.o mstr.o kvstore.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 cluster_legacy.o cluster_slot_stats.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crccombine.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 lolwut8.o acl.o tracking.o socket.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o connection.o unix.o logreqres.o xredis_gtid.o xredis_gtid_repl.o xredis_gtid_rs.o xredis_gtid_rdb.o ctrip_heartbeat.o ctrip.o xredis_gtid_gap_log.o xredis_gtid_adaptation_version.o xredis_gtid_cmdparse.o
REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX)
ifdef SWAP
SWAP_LIBS= ../deps/rocksdb/librocksdb.a ../deps/tdigest/tdigest.o
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gtidx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"complexity": "O(N)",
"group": "server",
"since": "2.0.0",
"arity": -3,
"arity": -2,
"function": "gtidxCommand",
"history": [
[
Expand Down
5 changes: 3 additions & 2 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2672,7 +2672,7 @@ static int updateSwapAbsentCacheEnabled(const char **err) {

static int updateReplBacklogSize(const char **err) {
UNUSED(err);
ctrip_resizeReplicationBacklog();
ctrip_resizeReplicationBacklog(-1);
return 1;
}

Expand Down Expand Up @@ -3568,7 +3568,7 @@ standardConfig static_configs[] = {
createBoolConfig("hide-user-data-from-log", NULL, MODIFIABLE_CONFIG, server.hide_user_data_from_log, 0, NULL, NULL),
createBoolConfig("lazyexpire-nested-arbitrary-keys", NULL, MODIFIABLE_CONFIG | HIDDEN_CONFIG, server.lazyexpire_nested_arbitrary_keys, 1, NULL, NULL),
createBoolConfig("cluster-slot-stats-enabled", NULL, MODIFIABLE_CONFIG, server.cluster_slot_stats_enabled, 0, NULL, NULL),
createBoolConfig("slave-repl-all", NULL, MODIFIABLE_CONFIG, server.repl_slave_repl_all, 0, NULL, NULL),
createBoolConfig("slave-repl-all", NULL, MODIFIABLE_CONFIG, server.repl_slave_repl_all, 0, NULL, NULL),
#ifdef ENABLE_SWAP
createBoolConfig("swap-debug-trace-latency", NULL, MODIFIABLE_CONFIG, server.swap_debug_trace_latency, 0, NULL, NULL),
createBoolConfig("swap-rordb-load-incremental-fsync", NULL, MODIFIABLE_CONFIG, server.swap_rordb_load_incremental_fsync, 1, NULL, NULL),
Expand Down Expand Up @@ -3846,6 +3846,7 @@ standardConfig static_configs[] = {

/* ctrip configs */
createBoolConfig("gtid-enabled", NULL, MODIFIABLE_CONFIG, server.gtid_enabled, 0, NULL, updateGtidEnabled),
createBoolConfig("gtid-gaplog-enabled", NULL, MODIFIABLE_CONFIG, server.gtid_gaplog_enabled, 1, NULL, NULL),

createIntConfig("tls-port", NULL, MODIFIABLE_CONFIG, 0, 65535, server.tls_port, 0, INTEGER_CONFIG, NULL, applyTLSPort), /* TCP port. */
createIntConfig("tls-session-cache-size", NULL, MODIFIABLE_CONFIG, 0, INT_MAX, server.tls_ctx_config.session_cache_size, 20*1024, INTEGER_CONFIG, NULL, applyTlsCfg),
Expand Down
2 changes: 1 addition & 1 deletion src/ctrip_swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ swapCtx *swapCtxCreate(client *c, keyRequest *key_request,
snprintf(identity,MAX_MSG,"[%s(%u):%s:%.*s]",
swapIntentionName(key_request->cmd_intention),
key_request->cmd_intention_flags,
c->cmd->name,MAX_MSG/2,key);
c->cmd->fullname,MAX_MSG/2,key);
swapDebugMsgsInit(&ctx->msgs, identity);
#endif
ctx->pd = pd;
Expand Down
Loading
Loading