Skip to content

Commit

Permalink
NOT FOR MERGE - debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
naglera committed Jul 25, 2024
1 parent 93557b2 commit 9e3ad13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,7 @@ void freeClient(client *c) {
void freeClientAsync(client *c) {
if (c->flag.close_asap || c->flag.script) return;
c->flag.close_asap = 1;
serverAssert(listSearchKey(server.clients_to_close,c) != NULL); // TODO remove
listAddNodeTail(server.clients_to_close, c);
}

Expand Down Expand Up @@ -1894,7 +1895,7 @@ int freeClientsInAsyncFreeQueue(void) {
if (!c->rdb_client_disconnect_time) {
if (c->conn) connSetReadHandler(c->conn, NULL);
c->rdb_client_disconnect_time = server.unixtime;
serverLog(LL_VERBOSE, "Postpone RDB client id=%llu (%s) free for %d seconds", (unsigned long long)c->id,
serverLog(LL_NOTICE, "Postpone RDB client id=%llu (%s) free for %d seconds", (unsigned long long)c->id,
replicationGetReplicaName(c), server.wait_before_rdb_client_free);
continue;
}
Expand Down
8 changes: 4 additions & 4 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void addRdbReplicaToPsyncWait(client *replica_rdb_client) {
tail->refcount++;
}
}
serverLog(LL_DEBUG, "Add rdb replica %s to waiting psync, with cid %llu, %s ",
serverLog(LL_NOTICE, "Add rdb replica %s to waiting psync, with cid %llu, %s ",
replicationGetReplicaName(replica_rdb_client), (unsigned long long)replica_rdb_client->id,
tail ? "tracking repl-backlog tail" : "no repl-backlog to track");
replica_rdb_client->ref_repl_buf_node = tail ? ln : NULL;
Expand All @@ -250,7 +250,7 @@ void backfillRdbReplicasToPsyncWait(void) {
if (replica_rdb_client->ref_repl_buf_node) continue;
replica_rdb_client->ref_repl_buf_node = ln;
head->refcount++;
serverLog(LL_DEBUG, "Attach replica rdb client %llu to repl buf block",
serverLog(LL_NOTICE, "Attach replica rdb client %llu to repl buf block",
(long long unsigned int)replica_rdb_client->id);
}
raxStop(&iter);
Expand All @@ -269,7 +269,7 @@ void removeReplicaFromPsyncWait(client *replica_main_client) {
}
replica_rdb_client->ref_repl_buf_node = NULL;
replica_rdb_client->flag.protected_rdb_channel = 0;
serverLog(LL_DEBUG, "Remove psync waiting replica %s with cid %llu, repl buffer block %s",
serverLog(LL_NOTICE, "Remove psync waiting replica %s with cid %llu, repl buffer block %s",
replicationGetReplicaName(replica_main_client),
(long long unsigned int)replica_main_client->associated_rdb_client_id,
o ? "ref count decreased" : "doesn't exist");
Expand Down Expand Up @@ -389,7 +389,7 @@ void freeReplicaReferencedReplBuffer(client *replica) {
if (replica->flag.repl_rdb_channel) {
uint64_t rdb_cid = htonu64(replica->id);
if (raxRemove(server.replicas_waiting_psync, (unsigned char *)&rdb_cid, sizeof(rdb_cid), NULL)) {
serverLog(LL_DEBUG, "Remove psync waiting replica %s with cid %llu from replicas rax.",
serverLog(LL_NOTICE, "Remove psync waiting replica %s with cid %llu from replicas rax.",
replicationGetReplicaName(replica), (long long unsigned int)replica->associated_rdb_client_id);
}
}
Expand Down

0 comments on commit 9e3ad13

Please sign in to comment.