Removed unused variables

Former-commit-id: 48663bc480f7279a94c68aeebdd9721ca64f7038
This commit is contained in:
VivekSainiEQ 2021-06-03 21:47:33 +00:00
parent 90c6cd6e2d
commit 09c4939287
4 changed files with 1 additions and 9 deletions

View File

@ -2347,7 +2347,6 @@ static int updateReplBacklogSize(long long val, long long prev, const char **err
UNUSED(err);
g_pserver->repl_backlog_size = prev;
resizeReplicationBacklog(val);
g_pserver->repl_backlog_config_size = g_pserver->repl_backlog_size;
return 1;
}

View File

@ -399,7 +399,6 @@ size_t freeMemoryGetNotCountedMemory(void) {
/* also don't count the replication backlog memory
* that's where the replication clients get their memory from */
// overhead += (g_pserver->repl_backlog_size - g_pserver->repl_backlog_config_size);
overhead += g_pserver->repl_backlog_size;
if (g_pserver->aof_state != AOF_OFF) {

View File

@ -1129,7 +1129,6 @@ void syncCommand(client *c) {
if (!strcasecmp((const char*)ptrFromObj(c->argv[0]),"psync")) {
if (masterTryPartialResynchronization(c) == C_OK) {
g_pserver->stat_sync_partial_ok++;
// c->repl_curr_idx = g_pserver->repl_backlog_idx;
return; /* No full resync needed, return. */
} else {
char *master_replid = (char*)ptrFromObj(c->argv[1]);
@ -1157,7 +1156,6 @@ void syncCommand(client *c) {
connDisableTcpNoDelay(c->conn); /* Non critical if it fails. */
c->repldbfd = -1;
c->flags |= CLIENT_SLAVE;
// c->repl_curr_idx = g_pserver->repl_backlog_idx;
listAddNodeTail(g_pserver->slaves,c);
/* Create the replication backlog if needed. */

View File

@ -1517,8 +1517,7 @@ struct client {
copying this replica output buffer
should use. */
long long repl_curr_idx = -1; /* Replication index sent, if this is a replica */
long long repl_curr_off = -1;
long long repl_curr_off = -1; /* Replication offset of the client, only if it's a replica*/
int fPendingReplicaWrite;
char replid[CONFIG_RUN_ID_SIZE+1]; /* Master replication ID (if master). */
@ -2416,9 +2415,6 @@ struct redisServer {
uint16_t rglockSamples[s_lockContentionSamples];
unsigned ilockRingHead = 0;
long long repl_backlog_config_size = 1024*1024; /* This is a hack to ignore the resizing of the replication backlog
when using it as a defacto for the client buffer */
bool FRdbSaveInProgress() const { return rdbThreadVars.fRdbThreadActive; }
};