Demoting some of the non-warning messages to notice (#10715)
We have cases where we print information (might be important but by no means an error indicator) with the LL_WARNING level. Demoting these to LL_NOTICE: - oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo - User requested shutdown... This is also true for cases that we encounter a rare but normal situation. Demoting to LL_NOTICE. Examples: - AOF was enabled but there is already another background operation. An AOF background was scheduled to start when possible. - Connection with master lost. base on yoav-steinberg's https://github.com/redis/redis/pull/10650#issuecomment-1112280554 and yossigo's https://github.com/redis/redis/pull/10650#pullrequestreview-967677676
This commit is contained in:
parent
5b61b0dc6d
commit
521e54f551
@ -975,16 +975,16 @@ int startAppendOnly(void) {
|
||||
server.aof_state = AOF_WAIT_REWRITE;
|
||||
if (hasActiveChildProcess() && server.child_type != CHILD_TYPE_AOF) {
|
||||
server.aof_rewrite_scheduled = 1;
|
||||
serverLog(LL_WARNING,"AOF was enabled but there is already another background operation. An AOF background was scheduled to start when possible.");
|
||||
serverLog(LL_NOTICE,"AOF was enabled but there is already another background operation. An AOF background was scheduled to start when possible.");
|
||||
} else if (server.in_exec){
|
||||
server.aof_rewrite_scheduled = 1;
|
||||
serverLog(LL_WARNING,"AOF was enabled during a transaction. An AOF background was scheduled to start when possible.");
|
||||
serverLog(LL_NOTICE,"AOF was enabled during a transaction. An AOF background was scheduled to start when possible.");
|
||||
} else {
|
||||
/* If there is a pending AOF rewrite, we need to switch it off and
|
||||
* start a new one: the old one cannot be reused because it is not
|
||||
* accumulating the AOF buffer. */
|
||||
if (server.child_type == CHILD_TYPE_AOF) {
|
||||
serverLog(LL_WARNING,"AOF was enabled but there is already an AOF rewriting in background. Stopping background AOF and starting a rewrite now.");
|
||||
serverLog(LL_NOTICE,"AOF was enabled but there is already an AOF rewriting in background. Stopping background AOF and starting a rewrite now.");
|
||||
killAppendOnlyChild();
|
||||
}
|
||||
|
||||
@ -1201,7 +1201,7 @@ void flushAppendOnlyFile(int force) {
|
||||
/* Successful write(2). If AOF was in error state, restore the
|
||||
* OK state and log the event. */
|
||||
if (server.aof_last_write_status == C_ERR) {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"AOF write error looks solved, Redis can write again.");
|
||||
server.aof_last_write_status = C_OK;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ int clusterLoadConfig(char *filename) {
|
||||
server.cluster->lastVoteEpoch =
|
||||
strtoull(argv[j+1],NULL,10);
|
||||
} else {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Skipping unknown cluster config variable '%s'",
|
||||
argv[j]);
|
||||
}
|
||||
@ -993,7 +993,7 @@ void clusterReset(int hard) {
|
||||
server.cluster->currentEpoch = 0;
|
||||
server.cluster->lastVoteEpoch = 0;
|
||||
myself->configEpoch = 0;
|
||||
serverLog(LL_WARNING, "configEpoch set to 0 via CLUSTER RESET HARD");
|
||||
serverLog(LL_NOTICE, "configEpoch set to 0 via CLUSTER RESET HARD");
|
||||
|
||||
/* To change the Node ID we need to remove the old name from the
|
||||
* nodes table, change the ID, and re-add back with new name. */
|
||||
@ -1628,7 +1628,7 @@ int clusterBumpConfigEpochWithoutConsensus(void) {
|
||||
myself->configEpoch = server.cluster->currentEpoch;
|
||||
clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|
|
||||
CLUSTER_TODO_FSYNC_CONFIG);
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"New configEpoch set to %llu",
|
||||
(unsigned long long) myself->configEpoch);
|
||||
return C_OK;
|
||||
@ -2121,7 +2121,7 @@ int nodeUpdateAddressIfNeeded(clusterNode *node, clusterLink *link,
|
||||
node->cport = cport;
|
||||
if (node->link) freeClusterLink(node->link);
|
||||
node->flags &= ~CLUSTER_NODE_NOADDR;
|
||||
serverLog(LL_WARNING,"Address updated for node %.40s, now %s:%d",
|
||||
serverLog(LL_NOTICE,"Address updated for node %.40s, now %s:%d",
|
||||
node->name, node->ip, node->port);
|
||||
|
||||
/* Check if this is our master and we have to change the
|
||||
@ -2186,7 +2186,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
|
||||
curmaster = nodeIsMaster(myself) ? myself : myself->slaveof;
|
||||
|
||||
if (sender == myself) {
|
||||
serverLog(LL_WARNING,"Discarding UPDATE message about myself.");
|
||||
serverLog(LL_NOTICE,"Discarding UPDATE message about myself.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2249,7 +2249,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
|
||||
if (newmaster && curmaster->numslots == 0 &&
|
||||
(server.cluster_allow_replica_migration ||
|
||||
sender_slots == migrated_our_slots)) {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Configuration change detected. Reconfiguring myself "
|
||||
"as a replica of %.40s", sender->name);
|
||||
clusterSetMaster(sender);
|
||||
@ -2266,7 +2266,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
|
||||
/* Safeguard against sub-replicas. A replica's master can turn itself
|
||||
* into a replica if its last slot is removed. If no other node takes
|
||||
* over the slot, there is nothing else to trigger replica migration. */
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"I'm a sub-replica! Reconfiguring myself as a replica of grandmaster %.40s",
|
||||
myself->slaveof->slaveof->name);
|
||||
clusterSetMaster(myself->slaveof->slaveof);
|
||||
@ -2618,7 +2618,7 @@ int clusterProcessPacket(clusterLink *link) {
|
||||
{
|
||||
server.cluster->mf_master_offset = sender->repl_offset;
|
||||
clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_MANUALFAILOVER);
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Received replication offset for paused "
|
||||
"master manual failover: %lld",
|
||||
server.cluster->mf_master_offset);
|
||||
@ -2647,7 +2647,7 @@ int clusterProcessPacket(clusterLink *link) {
|
||||
strcmp(ip,myself->ip))
|
||||
{
|
||||
memcpy(myself->ip,ip,NET_IP_STR_LEN);
|
||||
serverLog(LL_WARNING,"IP address for this node updated to %s",
|
||||
serverLog(LL_NOTICE,"IP address for this node updated to %s",
|
||||
myself->ip);
|
||||
clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG);
|
||||
}
|
||||
@ -2969,7 +2969,7 @@ int clusterProcessPacket(clusterLink *link) {
|
||||
pauseActions(PAUSE_DURING_FAILOVER,
|
||||
now + (CLUSTER_MF_TIMEOUT * CLUSTER_MF_PAUSE_MULT),
|
||||
PAUSE_ACTIONS_CLIENT_WRITE_SET);
|
||||
serverLog(LL_WARNING,"Manual failover requested by replica %.40s.",
|
||||
serverLog(LL_NOTICE,"Manual failover requested by replica %.40s.",
|
||||
sender->name);
|
||||
/* We need to send a ping message to the replica, as it would carry
|
||||
* `server.cluster->mf_master_offset`, which means the master paused clients
|
||||
@ -3782,7 +3782,7 @@ void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request) {
|
||||
node->slaveof->voted_time = mstime();
|
||||
clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|CLUSTER_TODO_FSYNC_CONFIG);
|
||||
clusterSendFailoverAuth(node);
|
||||
serverLog(LL_WARNING, "Failover auth granted to %.40s for epoch %llu",
|
||||
serverLog(LL_NOTICE, "Failover auth granted to %.40s for epoch %llu",
|
||||
node->name, (unsigned long long) server.cluster->currentEpoch);
|
||||
}
|
||||
|
||||
@ -4020,7 +4020,7 @@ void clusterHandleSlaveFailover(void) {
|
||||
server.cluster->failover_auth_rank = 0;
|
||||
clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_FAILOVER);
|
||||
}
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Start of election delayed for %lld milliseconds "
|
||||
"(rank #%d, offset %lld).",
|
||||
server.cluster->failover_auth_time - mstime(),
|
||||
@ -4047,7 +4047,7 @@ void clusterHandleSlaveFailover(void) {
|
||||
(newrank - server.cluster->failover_auth_rank) * 1000;
|
||||
server.cluster->failover_auth_time += added_delay;
|
||||
server.cluster->failover_auth_rank = newrank;
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Replica rank updated to #%d, added %lld milliseconds of delay.",
|
||||
newrank, added_delay);
|
||||
}
|
||||
@ -4069,7 +4069,7 @@ void clusterHandleSlaveFailover(void) {
|
||||
if (server.cluster->failover_auth_sent == 0) {
|
||||
server.cluster->currentEpoch++;
|
||||
server.cluster->failover_auth_epoch = server.cluster->currentEpoch;
|
||||
serverLog(LL_WARNING,"Starting a failover election for epoch %llu.",
|
||||
serverLog(LL_NOTICE,"Starting a failover election for epoch %llu.",
|
||||
(unsigned long long) server.cluster->currentEpoch);
|
||||
clusterRequestFailoverAuth();
|
||||
server.cluster->failover_auth_sent = 1;
|
||||
@ -4083,13 +4083,13 @@ void clusterHandleSlaveFailover(void) {
|
||||
if (server.cluster->failover_auth_count >= needed_quorum) {
|
||||
/* We have the quorum, we can finally failover the master. */
|
||||
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Failover election won: I'm the new master.");
|
||||
|
||||
/* Update my configEpoch to the epoch of the election. */
|
||||
if (myself->configEpoch < server.cluster->failover_auth_epoch) {
|
||||
myself->configEpoch = server.cluster->failover_auth_epoch;
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"configEpoch set to %llu after successful failover",
|
||||
(unsigned long long) myself->configEpoch);
|
||||
}
|
||||
@ -4207,7 +4207,7 @@ void clusterHandleSlaveMigration(int max_slaves) {
|
||||
(mstime()-target->orphaned_time) > CLUSTER_SLAVE_MIGRATION_DELAY &&
|
||||
!(server.cluster_module_flags & CLUSTER_MODULE_FLAG_NO_FAILOVER))
|
||||
{
|
||||
serverLog(LL_WARNING,"Migrating to orphaned master %.40s",
|
||||
serverLog(LL_NOTICE,"Migrating to orphaned master %.40s",
|
||||
target->name);
|
||||
clusterSetMaster(target);
|
||||
}
|
||||
@ -4283,7 +4283,7 @@ void clusterHandleManualFailover(void) {
|
||||
/* Our replication offset matches the master replication offset
|
||||
* announced after clients were paused. We can start the failover. */
|
||||
server.cluster->mf_can_start = 1;
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"All master replication stream processed, "
|
||||
"manual failover can start.");
|
||||
clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_FAILOVER);
|
||||
@ -4842,7 +4842,8 @@ void clusterUpdateState(void) {
|
||||
}
|
||||
|
||||
/* Change the state and log the event. */
|
||||
serverLog(LL_WARNING,"Cluster state changed: %s",
|
||||
serverLog(new_state == CLUSTER_OK ? LL_NOTICE : LL_WARNING,
|
||||
"Cluster state changed: %s",
|
||||
new_state == CLUSTER_OK ? "ok" : "fail");
|
||||
server.cluster->state = new_state;
|
||||
}
|
||||
@ -4905,11 +4906,11 @@ int verifyClusterConfigWithData(void) {
|
||||
update_config++;
|
||||
/* Case A: slot is unassigned. Take responsibility for it. */
|
||||
if (server.cluster->slots[j] == NULL) {
|
||||
serverLog(LL_WARNING, "I have keys for unassigned slot %d. "
|
||||
serverLog(LL_NOTICE, "I have keys for unassigned slot %d. "
|
||||
"Taking responsibility for it.",j);
|
||||
clusterAddSlot(myself,j);
|
||||
} else {
|
||||
serverLog(LL_WARNING, "I have keys for slot %d, but the slot is "
|
||||
serverLog(LL_NOTICE, "I have keys for slot %d, but the slot is "
|
||||
"assigned to another node. "
|
||||
"Setting it to importing state.",j);
|
||||
server.cluster->importing_slots_from[j] = server.cluster->slots[j];
|
||||
@ -5920,7 +5921,7 @@ NULL
|
||||
myself->numslots == 0 &&
|
||||
server.cluster_allow_replica_migration)
|
||||
{
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Configuration change detected. Reconfiguring myself "
|
||||
"as a replica of %.40s", n->name);
|
||||
clusterSetMaster(n);
|
||||
@ -5944,7 +5945,7 @@ NULL
|
||||
* configEpoch collision resolution will fix it assigning
|
||||
* a different epoch to each node. */
|
||||
if (clusterBumpConfigEpochWithoutConsensus() == C_OK) {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"configEpoch updated after importing slot %d", slot);
|
||||
}
|
||||
server.cluster->importing_slots_from[slot] = NULL;
|
||||
@ -6160,17 +6161,17 @@ NULL
|
||||
* generates a new configuration epoch for this node without
|
||||
* consensus, claims the master's slots, and broadcast the new
|
||||
* configuration. */
|
||||
serverLog(LL_WARNING,"Taking over the master (user request).");
|
||||
serverLog(LL_NOTICE,"Taking over the master (user request).");
|
||||
clusterBumpConfigEpochWithoutConsensus();
|
||||
clusterFailoverReplaceYourMaster();
|
||||
} else if (force) {
|
||||
/* If this is a forced failover, we don't need to talk with our
|
||||
* master to agree about the offset. We just failover taking over
|
||||
* it without coordination. */
|
||||
serverLog(LL_WARNING,"Forced failover user request accepted.");
|
||||
serverLog(LL_NOTICE,"Forced failover user request accepted.");
|
||||
server.cluster->mf_can_start = 1;
|
||||
} else {
|
||||
serverLog(LL_WARNING,"Manual failover user request accepted.");
|
||||
serverLog(LL_NOTICE,"Manual failover user request accepted.");
|
||||
clusterSendMFStart(myself->slaveof);
|
||||
}
|
||||
addReply(c,shared.ok);
|
||||
@ -6197,7 +6198,7 @@ NULL
|
||||
addReplyError(c,"Node config epoch is already non-zero");
|
||||
} else {
|
||||
myself->configEpoch = epoch;
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"configEpoch set to %llu via CLUSTER SET-CONFIG-EPOCH",
|
||||
(unsigned long long) myself->configEpoch);
|
||||
|
||||
|
@ -702,7 +702,7 @@ void loadServerConfig(char *filename, char config_from_stdin, char *options) {
|
||||
|
||||
/* Append content from stdin */
|
||||
if (config_from_stdin) {
|
||||
serverLog(LL_WARNING,"Reading config from stdin");
|
||||
serverLog(LL_NOTICE,"Reading config from stdin");
|
||||
fp = stdin;
|
||||
while(fgets(buf,CONFIG_READ_LEN+1,fp) != NULL)
|
||||
config = sdscat(config,buf);
|
||||
@ -3366,7 +3366,7 @@ void configRewriteCommand(client *c) {
|
||||
serverLog(LL_WARNING,"CONFIG REWRITE failed: %s", strerror(err));
|
||||
addReplyErrorFormat(c,"Rewriting config file: %s", strerror(err));
|
||||
} else {
|
||||
serverLog(LL_WARNING,"CONFIG REWRITE executed with success.");
|
||||
serverLog(LL_NOTICE,"CONFIG REWRITE executed with success.");
|
||||
addReply(c,shared.ok);
|
||||
}
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ NULL
|
||||
addReplyError(c,"Error trying to load the RDB dump, check server logs.");
|
||||
return;
|
||||
}
|
||||
serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD");
|
||||
serverLog(LL_NOTICE,"DB reloaded by DEBUG RELOAD");
|
||||
addReply(c,shared.ok);
|
||||
} else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
|
||||
if (server.aof_state != AOF_OFF) flushAppendOnlyFile(1);
|
||||
@ -591,7 +591,7 @@ NULL
|
||||
return;
|
||||
}
|
||||
server.dirty = 0; /* Prevent AOF / replication */
|
||||
serverLog(LL_WARNING,"Append Only File loaded by DEBUG LOADAOF");
|
||||
serverLog(LL_NOTICE,"Append Only File loaded by DEBUG LOADAOF");
|
||||
addReply(c,shared.ok);
|
||||
} else if (!strcasecmp(c->argv[1]->ptr,"drop-cluster-packet-filter") && c->argc == 3) {
|
||||
long packet_type;
|
||||
@ -933,7 +933,7 @@ NULL
|
||||
addReplyVerbatim(c,buf,strlen(buf),"txt");
|
||||
}
|
||||
} else if (!strcasecmp(c->argv[1]->ptr,"change-repl-id") && c->argc == 2) {
|
||||
serverLog(LL_WARNING,"Changing replication IDs after receiving DEBUG change-repl-id");
|
||||
serverLog(LL_NOTICE,"Changing replication IDs after receiving DEBUG change-repl-id");
|
||||
changeReplicationId();
|
||||
clearReplicationId2();
|
||||
addReply(c,shared.ok);
|
||||
@ -1826,7 +1826,7 @@ void logServerInfo(void) {
|
||||
decrRefCount(argv[0]);
|
||||
}
|
||||
|
||||
/* Log certain config values, which can be used for debuggin */
|
||||
/* Log certain config values, which can be used for debugging */
|
||||
void logConfigDebugInfo(void) {
|
||||
sds configstring;
|
||||
configstring = getConfigDebugInfo();
|
||||
|
10
src/eval.c
10
src/eval.c
@ -790,7 +790,7 @@ int ldbStartSession(client *c) {
|
||||
/* Log the creation of the child and close the listening
|
||||
* socket to make sure if the parent crashes a reset is sent
|
||||
* to the clients. */
|
||||
serverLog(LL_WARNING,"Redis forked for debugging eval");
|
||||
serverLog(LL_NOTICE,"Redis forked for debugging eval");
|
||||
} else {
|
||||
/* Parent */
|
||||
listAddNodeTail(ldb.children,(void*)(unsigned long)cp);
|
||||
@ -798,7 +798,7 @@ int ldbStartSession(client *c) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Redis synchronous debugging eval session started");
|
||||
}
|
||||
|
||||
@ -832,10 +832,10 @@ void ldbEndSession(client *c) {
|
||||
/* If it's a fork()ed session, we just exit. */
|
||||
if (ldb.forked) {
|
||||
writeToClient(c,0);
|
||||
serverLog(LL_WARNING,"Lua debugging session child exiting");
|
||||
serverLog(LL_NOTICE,"Lua debugging session child exiting");
|
||||
exitFromChild(0);
|
||||
} else {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Redis synchronous debugging eval session ended");
|
||||
}
|
||||
|
||||
@ -879,7 +879,7 @@ void ldbKillForkedSessions(void) {
|
||||
listRewind(ldb.children,&li);
|
||||
while((ln = listNext(&li))) {
|
||||
pid_t pid = (unsigned long) ln->value;
|
||||
serverLog(LL_WARNING,"Killing debugging session %ld",(long)pid);
|
||||
serverLog(LL_NOTICE,"Killing debugging session %ld",(long)pid);
|
||||
kill(pid,SIGKILL);
|
||||
}
|
||||
listRelease(ldb.children);
|
||||
|
@ -1533,7 +1533,7 @@ void freeClient(client *c) {
|
||||
* Note that before doing this we make sure that the client is not in
|
||||
* some unexpected state, by checking its flags. */
|
||||
if (server.master && c->flags & CLIENT_MASTER) {
|
||||
serverLog(LL_WARNING,"Connection with master lost.");
|
||||
serverLog(LL_NOTICE,"Connection with master lost.");
|
||||
if (!(c->flags & (CLIENT_PROTOCOL_ERROR|CLIENT_BLOCKED))) {
|
||||
c->flags &= ~(CLIENT_CLOSE_ASAP|CLIENT_CLOSE_AFTER_REPLY);
|
||||
replicationCacheMaster(c);
|
||||
@ -1543,7 +1543,7 @@ void freeClient(client *c) {
|
||||
|
||||
/* Log link disconnection with slave */
|
||||
if (getClientType(c) == CLIENT_TYPE_SLAVE) {
|
||||
serverLog(LL_WARNING,"Connection with replica %s lost.",
|
||||
serverLog(LL_NOTICE,"Connection with replica %s lost.",
|
||||
replicationGetSlaveName(c));
|
||||
}
|
||||
|
||||
|
@ -3215,7 +3215,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin
|
||||
* continue loading. */
|
||||
if (error == RDB_LOAD_ERR_EMPTY_KEY) {
|
||||
if(empty_keys_skipped++ < 10)
|
||||
serverLog(LL_WARNING, "rdbLoadObject skipping empty key: %s", key);
|
||||
serverLog(LL_NOTICE, "rdbLoadObject skipping empty key: %s", key);
|
||||
sdsfree(key);
|
||||
} else {
|
||||
sdsfree(key);
|
||||
@ -3292,7 +3292,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin
|
||||
if (server.rdb_checksum && !server.skip_checksum_validation) {
|
||||
memrev64ifbe(&cksum);
|
||||
if (cksum == 0) {
|
||||
serverLog(LL_WARNING,"RDB file was saved with checksum disabled: no check performed.");
|
||||
serverLog(LL_NOTICE,"RDB file was saved with checksum disabled: no check performed.");
|
||||
} else if (cksum != expected) {
|
||||
serverLog(LL_WARNING,"Wrong RDB checksum expected: (%llx) but "
|
||||
"got (%llx). Aborting now.",
|
||||
@ -3305,7 +3305,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin
|
||||
}
|
||||
|
||||
if (empty_keys_skipped) {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Done loading RDB, keys loaded: %lld, keys expired: %lld, empty keys skipped: %lld.",
|
||||
server.rdb_last_load_keys_loaded, server.rdb_last_load_keys_expired, empty_keys_skipped);
|
||||
} else {
|
||||
|
@ -528,7 +528,7 @@ void showLatestBacklog(void) {
|
||||
|
||||
/* Finally log such bytes: this is vital debugging info to
|
||||
* understand what happened. */
|
||||
serverLog(LL_WARNING,"Latest backlog is: '%s'", dump);
|
||||
serverLog(LL_NOTICE,"Latest backlog is: '%s'", dump);
|
||||
sdsfree(dump);
|
||||
}
|
||||
|
||||
@ -925,7 +925,7 @@ void syncCommand(client *c) {
|
||||
if (c->argc > 3 && !strcasecmp(c->argv[0]->ptr,"psync") &&
|
||||
!strcasecmp(c->argv[3]->ptr,"failover"))
|
||||
{
|
||||
serverLog(LL_WARNING, "Failover request received for replid %s.",
|
||||
serverLog(LL_NOTICE, "Failover request received for replid %s.",
|
||||
(unsigned char *)c->argv[1]->ptr);
|
||||
if (!server.masterhost) {
|
||||
addReplyError(c, "PSYNC FAILOVER can't be sent to a master.");
|
||||
@ -1515,7 +1515,7 @@ void rdbPipeReadHandler(struct aeEventLoop *eventLoop, int fd, void *clientData,
|
||||
continue;
|
||||
stillUp++;
|
||||
}
|
||||
serverLog(LL_WARNING,"Diskless rdb transfer, done reading from pipe, %d replicas still up.", stillUp);
|
||||
serverLog(LL_NOTICE,"Diskless rdb transfer, done reading from pipe, %d replicas still up.", stillUp);
|
||||
/* Now that the replicas have finished reading, notify the child that it's safe to exit.
|
||||
* When the server detects the child has exited, it can mark the replica as online, and
|
||||
* start streaming the replication buffers. */
|
||||
@ -1693,7 +1693,7 @@ void shiftReplicationId(void) {
|
||||
* byte, and is asking for the new bytes starting at offset 51. */
|
||||
server.second_replid_offset = server.master_repl_offset+1;
|
||||
changeReplicationId();
|
||||
serverLog(LL_WARNING,"Setting secondary replication ID to %s, valid up to offset: %lld. New replication ID is %s", server.replid2, server.second_replid_offset, server.replid);
|
||||
serverLog(LL_NOTICE,"Setting secondary replication ID to %s, valid up to offset: %lld. New replication ID is %s", server.replid2, server.second_replid_offset, server.replid);
|
||||
}
|
||||
|
||||
/* ----------------------------------- SLAVE -------------------------------- */
|
||||
@ -1794,13 +1794,13 @@ static int useDisklessLoad() {
|
||||
if (enabled) {
|
||||
/* Check all modules handle read errors, otherwise it's not safe to use diskless load. */
|
||||
if (!moduleAllDatatypesHandleErrors()) {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Skipping diskless-load because there are modules that don't handle read errors.");
|
||||
enabled = 0;
|
||||
}
|
||||
/* Check all modules handle async replication, otherwise it's not safe to use diskless load. */
|
||||
else if (server.repl_diskless_load == REPL_DISKLESS_LOAD_SWAPDB && !moduleAllModulesHandleReplAsyncLoad()) {
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Skipping diskless-load because there are modules that are not aware of async replication.");
|
||||
enabled = 0;
|
||||
}
|
||||
@ -2527,7 +2527,7 @@ int slaveTryPartialResynchronization(connection *conn, int read_reply) {
|
||||
|
||||
if (strcmp(new,server.cached_master->replid)) {
|
||||
/* Master ID changed. */
|
||||
serverLog(LL_WARNING,"Master replication ID changed to %s",new);
|
||||
serverLog(LL_NOTICE,"Master replication ID changed to %s",new);
|
||||
|
||||
/* Set the old ID as our ID2, up to the current offset+1. */
|
||||
memcpy(server.replid2,server.cached_master->replid,
|
||||
|
@ -1289,7 +1289,7 @@ void luaSetErrorMetatable(lua_State *lua) {
|
||||
static int luaNewIndexAllowList(lua_State *lua) {
|
||||
int argc = lua_gettop(lua);
|
||||
if (argc != 3) {
|
||||
serverLog(LL_WARNING, "malicious code trying to call luaProtectedTableError with wrong arguments");
|
||||
serverLog(LL_WARNING, "malicious code trying to call luaNewIndexAllowList with wrong arguments");
|
||||
luaL_error(lua, "Wrong number of arguments to luaNewIndexAllowList");
|
||||
}
|
||||
if (!lua_istable(lua, -3)) {
|
||||
@ -1560,7 +1560,7 @@ static void luaMaskCountHook(lua_State *lua, lua_Debug *ar) {
|
||||
scriptRunCtx* rctx = luaGetFromRegistry(lua, REGISTRY_RUN_CTX_NAME);
|
||||
serverAssert(rctx); /* Only supported inside script invocation */
|
||||
if (scriptInterrupt(rctx) == SCRIPT_KILL) {
|
||||
serverLog(LL_WARNING,"Lua script killed by user with SCRIPT KILL.");
|
||||
serverLog(LL_NOTICE,"Lua script killed by user with SCRIPT KILL.");
|
||||
|
||||
/*
|
||||
* Set the hook to invoke all the time so the user
|
||||
|
@ -540,7 +540,7 @@ void sentinelIsRunning(void) {
|
||||
}
|
||||
|
||||
/* Log its ID to make debugging of issues simpler. */
|
||||
serverLog(LL_WARNING,"Sentinel ID is %s", sentinel.myid);
|
||||
serverLog(LL_NOTICE,"Sentinel ID is %s", sentinel.myid);
|
||||
|
||||
/* We want to generate a +monitor event for every configured master
|
||||
* at startup. */
|
||||
@ -3950,7 +3950,7 @@ NULL
|
||||
addReplyError(c,"-NOGOODSLAVE No suitable replica to promote");
|
||||
return;
|
||||
}
|
||||
serverLog(LL_WARNING,"Executing user requested FAILOVER of '%s'",
|
||||
serverLog(LL_NOTICE,"Executing user requested FAILOVER of '%s'",
|
||||
ri->name);
|
||||
sentinelStartFailover(ri);
|
||||
ri->flags |= SRI_FORCE_FAILOVER;
|
||||
@ -4585,7 +4585,7 @@ void sentinelReceiveIsMasterDownReply(redisAsyncContext *c, void *reply, void *p
|
||||
* replied with a vote. */
|
||||
sdsfree(ri->leader);
|
||||
if ((long long)ri->leader_epoch != r->element[2]->integer)
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"%s voted for %s %llu", ri->name,
|
||||
r->element[1]->str,
|
||||
(unsigned long long) r->element[2]->integer);
|
||||
@ -4900,7 +4900,7 @@ int sentinelStartFailoverIfNeeded(sentinelRedisInstance *master) {
|
||||
ctime_r(&clock,ctimebuf);
|
||||
ctimebuf[24] = '\0'; /* Remove newline. */
|
||||
master->failover_delay_logged = master->failover_start_time;
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Next failover delay: I will not start a failover before %s",
|
||||
ctimebuf);
|
||||
}
|
||||
|
12
src/server.c
12
src/server.c
@ -4175,7 +4175,7 @@ int prepareForShutdown(int flags) {
|
||||
|
||||
server.shutdown_flags = flags;
|
||||
|
||||
serverLog(LL_WARNING,"User requested shutdown...");
|
||||
serverLog(LL_NOTICE,"User requested shutdown...");
|
||||
if (server.supervised_mode == SUPERVISED_SYSTEMD)
|
||||
redisCommunicateSystemd("STOPPING=1\n");
|
||||
|
||||
@ -4263,7 +4263,7 @@ int finishShutdown(void) {
|
||||
num_lagging_replicas++;
|
||||
long lag = replica->replstate == SLAVE_STATE_ONLINE ?
|
||||
time(NULL) - replica->repl_ack_time : 0;
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE,
|
||||
"Lagging replica %s reported offset %lld behind master, lag=%ld, state=%s.",
|
||||
replicationGetSlaveName(replica),
|
||||
server.master_repl_offset - replica->repl_ack_off,
|
||||
@ -7164,8 +7164,8 @@ int main(int argc, char **argv) {
|
||||
int background = server.daemonize && !server.supervised;
|
||||
if (background) daemonize();
|
||||
|
||||
serverLog(LL_WARNING, "oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo");
|
||||
serverLog(LL_WARNING,
|
||||
serverLog(LL_NOTICE, "oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo");
|
||||
serverLog(LL_NOTICE,
|
||||
"Redis version=%s, bits=%d, commit=%s, modified=%d, pid=%d, just started",
|
||||
REDIS_VERSION,
|
||||
(sizeof(long) == 8) ? 64 : 32,
|
||||
@ -7176,7 +7176,7 @@ int main(int argc, char **argv) {
|
||||
if (argc == 1) {
|
||||
serverLog(LL_WARNING, "Warning: no config file specified, using the default config. In order to specify a config file use %s /path/to/redis.conf", argv[0]);
|
||||
} else {
|
||||
serverLog(LL_WARNING, "Configuration loaded");
|
||||
serverLog(LL_NOTICE, "Configuration loaded");
|
||||
}
|
||||
|
||||
initServer();
|
||||
@ -7200,7 +7200,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (!server.sentinel_mode) {
|
||||
/* Things not needed when running in Sentinel mode. */
|
||||
serverLog(LL_WARNING,"Server initialized");
|
||||
serverLog(LL_NOTICE,"Server initialized");
|
||||
#ifdef __linux__
|
||||
linuxMemoryWarnings();
|
||||
sds err_msg = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user