Modify some error logs printing level. (#9306)

1. In sendBulkToSlave, we used LL_VERBOSE in the past, changed to
LL_WARNING. (all the other places that do freeClient(slave) use LL_WARNING)
2. The old style LOG_WARNING, chang it to LL_WARNING. Introduced in an
old pr (#1690).
This commit is contained in:
Binbin 2021-08-02 16:18:35 +08:00 committed by GitHub
parent f74af0e61d
commit 4000cb7d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -352,7 +352,7 @@ static int updateOOMScoreAdjValues(sds *args, const char **err, int apply) {
if (values[CONFIG_OOM_REPLICA] < values[CONFIG_OOM_MASTER] || if (values[CONFIG_OOM_REPLICA] < values[CONFIG_OOM_MASTER] ||
values[CONFIG_OOM_BGCHILD] < values[CONFIG_OOM_REPLICA]) { values[CONFIG_OOM_BGCHILD] < values[CONFIG_OOM_REPLICA]) {
serverLog(LOG_WARNING, serverLog(LL_WARNING,
"The oom-score-adj-values configuration may not work for non-privileged processes! " "The oom-score-adj-values configuration may not work for non-privileged processes! "
"Please consult the documentation."); "Please consult the documentation.");
} }

View File

@ -1106,7 +1106,7 @@ void sendBulkToSlave(connection *conn) {
if (slave->replpreamble) { if (slave->replpreamble) {
nwritten = connWrite(conn,slave->replpreamble,sdslen(slave->replpreamble)); nwritten = connWrite(conn,slave->replpreamble,sdslen(slave->replpreamble));
if (nwritten == -1) { if (nwritten == -1) {
serverLog(LL_VERBOSE, serverLog(LL_WARNING,
"Write error sending RDB preamble to replica: %s", "Write error sending RDB preamble to replica: %s",
connGetLastError(conn)); connGetLastError(conn));
freeClient(slave); freeClient(slave);

View File

@ -2879,7 +2879,7 @@ int setOOMScoreAdj(int process_class) {
fd = open("/proc/self/oom_score_adj", O_WRONLY); fd = open("/proc/self/oom_score_adj", O_WRONLY);
if (fd < 0 || write(fd, buf, strlen(buf)) < 0) { if (fd < 0 || write(fd, buf, strlen(buf)) < 0) {
serverLog(LOG_WARNING, "Unable to write oom_score_adj: %s", strerror(errno)); serverLog(LL_WARNING, "Unable to write oom_score_adj: %s", strerror(errno));
if (fd != -1) close(fd); if (fd != -1) close(fd);
return C_ERR; return C_ERR;
} }