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 redis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2063,4 +2063,4 @@ jemalloc-bg-thread yes
gtid-enabled no

# If master & slave gtid gap is less than max-gap, xsync will continue.
# gtid-xsync-max-gap 10000
# gtid-xsync-max-gap 60000
2 changes: 1 addition & 1 deletion ror.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2548,5 +2548,5 @@ rocksdb.ratelimiter.rate_per_sec 1024mb
gtid-enabled no

# If master & slave gtid gap is less than max-gap, xsync will continue.
# gtid-xsync-max-gap 10000
# gtid-xsync-max-gap 60000

11 changes: 10 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,15 @@ static int updateMaxmemory(long long val, long long prev, const char **err) {
}
return 1;
}

static int updateGtidXsyncMaxGap(long long val, long long prev, const char **err) {;
UNUSED(err);
if (val != prev) {
gtidGaplogResetDataSize(server.gtid_gap_log, val);
}
return 1;
}

#ifdef ENABLE_SWAP
static int updateSwapAbsentCacheCapacity(long long val, long long prev, const char **err) {
UNUSED(prev);
Expand Down Expand Up @@ -3166,7 +3175,7 @@ standardConfig configs[] = {
createULongLongConfig("swap-sst-age-limit-refresh-period", NULL, MODIFIABLE_CONFIG, 1, 3600*24, server.swap_sst_age_limit_refresh_period, 60, INTEGER_CONFIG, NULL, NULL),
createULongLongConfig("swap-swap-info-slave-period", NULL, MODIFIABLE_CONFIG, 1, 3600*24, server.swap_swap_info_slave_period, 60, INTEGER_CONFIG, NULL, NULL),
#endif
createULongLongConfig("gtid-xsync-max-gap", NULL, MODIFIABLE_CONFIG, 0, ULLONG_MAX, server.gtid_xsync_max_gap, 10000, INTEGER_CONFIG, NULL, NULL),
createULongLongConfig("gtid-xsync-max-gap", NULL, MODIFIABLE_CONFIG, 0, ULLONG_MAX, server.gtid_xsync_max_gap, 60000, INTEGER_CONFIG, NULL, updateGtidXsyncMaxGap),

/* Size_t configs */
createSizeTConfig("hash-max-ziplist-entries", NULL, MODIFIABLE_CONFIG, 0, LONG_MAX, server.hash_max_ziplist_entries, 512, INTEGER_CONFIG, NULL, NULL),
Expand Down
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3521,7 +3521,7 @@ void initServer(void) {
server.gtid_lost = gtidSetNew();
xsyncUuidInterestedInit();
gtidInitialInfoInit(server.gtid_initial);
server.gtid_gap_log = gtidGaplogNew();
server.gtid_gap_log = gtidGaplogNew(server.gtid_xsync_max_gap);
server.gtid_xsync_fullresync_indicator = 0;
server.gtid_executed_cmd_count = 0;
server.gtid_ignored_cmd_count = 0;
Expand Down
Loading