diff options
author | Binbin <binloveplay1314@qq.com> | 2022-02-04 17:39:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 11:39:51 +0200 |
commit | d7fcb3c5a16dce188728b0c2ab3a2a0df9bb5e2a (patch) | |
tree | c8f06b54ca27da94c9adf9d3d287f5f16559be6f /src/debug.c | |
parent | d2fde2f6557a0c2f2963a0a0fb626510af62f545 (diff) | |
download | redis-d7fcb3c5a16dce188728b0c2ab3a2a0df9bb5e2a.tar.gz |
Fix SENTINEL SET config rewrite test (#10232)
Change the sentinel config file to a directory in SENTINEL SET test.
So it will now fail on the `rename` in `rewriteConfigOverwriteFile`.
The test used to set the sentinel config file permissions to `000` to
simulate failure. But it fails on centos7 / freebsd / alpine. (introduced in #10151)
Other changes:
1. More error messages after the config rewrite failure.
2. Modify arg name `force_all` in `rewriteConfig` to `force_write`. (was rename in #9304)
3. Fix a typo in debug quicklist-packed-threshold, then -> than. (#9357)
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug.c b/src/debug.c index 2da2c5d50..146460646 100644 --- a/src/debug.c +++ b/src/debug.c @@ -825,7 +825,7 @@ NULL int memerr; unsigned long long sz = memtoull((const char *)c->argv[2]->ptr, &memerr); if (memerr || !quicklistisSetPackedThreshold(sz)) { - addReplyError(c, "argument must be a memory value bigger then 1 and smaller than 4gb"); + addReplyError(c, "argument must be a memory value bigger than 1 and smaller than 4gb"); } else { addReply(c,shared.ok); } @@ -926,7 +926,7 @@ NULL } else if (!strcasecmp(c->argv[1]->ptr,"config-rewrite-force-all") && c->argc == 2) { if (rewriteConfig(server.configfile, 1) == -1) - addReplyError(c, "CONFIG-REWRITE-FORCE-ALL failed"); + addReplyErrorFormat(c, "CONFIG-REWRITE-FORCE-ALL failed: %s", strerror(errno)); else addReply(c, shared.ok); } else if(!strcasecmp(c->argv[1]->ptr,"client-eviction") && c->argc == 2) { |