Commit 7b9fc6fc authored by Oran Agra's avatar Oran Agra
Browse files

Merge 'origin/unstable' into 7.0 for 7.0.3

parents 05833959 693acc01
......@@ -11,7 +11,8 @@
"ADMIN",
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -17,7 +17,8 @@
"ADMIN",
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -10,7 +10,8 @@
"command_flags": [
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -10,7 +10,8 @@
"command_flags": [
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -10,7 +10,8 @@
"command_flags": [
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -10,7 +10,8 @@
"command_flags": [
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -11,7 +11,8 @@
"ADMIN",
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -11,7 +11,8 @@
"ADMIN",
"NOSCRIPT",
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -7,6 +7,12 @@
"arity": -4,
"container": "CLUSTER",
"function": "clusterCommand",
"history": [
[
"4.0.0",
"Added the optional `cluster_bus_port` argument."
]
],
"command_flags": [
"NO_ASYNC_LOADING",
"ADMIN",
......@@ -23,6 +29,12 @@
{
"name": "port",
"type": "integer"
},
{
"name": "cluster_bus_port",
"type": "integer",
"optional": true,
"since": "4.0.0"
}
]
}
......
......@@ -4,7 +4,7 @@
"complexity": "O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.",
"group": "cluster",
"since": "3.0.0",
"arity": 3,
"arity": -2,
"container": "CLUSTER",
"function": "clusterCommand",
"command_flags": [
......
......@@ -9,7 +9,8 @@
"function": "commandCountCommand",
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -9,7 +9,8 @@
"function": "commandDocsCommand",
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -9,7 +9,8 @@
"function": "commandGetKeysCommand",
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -9,7 +9,8 @@
"function": "commandGetKeysAndFlagsCommand",
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -9,7 +9,8 @@
"function": "commandHelpCommand",
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -15,7 +15,8 @@
],
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -9,7 +9,8 @@
"function": "commandListCommand",
"command_flags": [
"LOADING",
"STALE"
"STALE",
"SENTINEL"
],
"acl_categories": [
"CONNECTION"
......
......@@ -7,6 +7,8 @@
"arity": 2,
"function": "echoCommand",
"command_flags": [
"LOADING",
"STALE",
"FAST"
],
"acl_categories": [
......
......@@ -45,11 +45,11 @@
"key_spec_index": 0
},
{
"name": "min",
"name": "start",
"type": "string"
},
{
"name": "max",
"name": "stop",
"type": "string"
},
{
......
......@@ -1665,6 +1665,7 @@ int rewriteConfigOverwriteFile(char *configfile, sds content) {
const char *tmp_suffix = ".XXXXXX";
size_t offset = 0;
ssize_t written_bytes = 0;
int old_errno;
int tmp_path_len = snprintf(tmp_conffile, sizeof(tmp_conffile), "%s%s", configfile, tmp_suffix);
if (tmp_path_len <= 0 || (unsigned int)tmp_path_len >= sizeof(tmp_conffile)) {
......@@ -1701,14 +1702,18 @@ int rewriteConfigOverwriteFile(char *configfile, sds content) {
serverLog(LL_WARNING, "Could not chmod config file (%s)", strerror(errno));
else if (rename(tmp_conffile, configfile) == -1)
serverLog(LL_WARNING, "Could not rename tmp config file (%s)", strerror(errno));
else if (fsyncFileDir(configfile) == -1)
serverLog(LL_WARNING, "Could not sync config file dir (%s)", strerror(errno));
else {
retval = 0;
serverLog(LL_DEBUG, "Rewritten config file (%s) successfully", configfile);
}
cleanup:
old_errno = errno;
close(fd);
if (retval) unlink(tmp_conffile);
errno = old_errno;
return retval;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment