diff options
author | Mixficsol <838844609@qq.com> | 2022-06-06 13:17:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 08:17:18 +0300 |
commit | c751d8a686aa298d591ccf18adf5d1cc19808a4c (patch) | |
tree | 5c741339f8eeceb706d6b59fd330c11efc46f19f | |
parent | 247e792bde45ab36cbbaecad5c7f9d5660bbff01 (diff) | |
download | redis-c751d8a686aa298d591ccf18adf5d1cc19808a4c.tar.gz |
Update cluster.c (#10773)
On line 4068, redis has a logical nodeIsSlave(myself) on the outer if layer,
which you can delete without having to repeat the decision
-rw-r--r-- | src/cluster.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cluster.c b/src/cluster.c index 5f3c75e09..d328ede2f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -4077,7 +4077,7 @@ void clusterCron(void) { orphaned_masters++; } if (okslaves > max_slaves) max_slaves = okslaves; - if (nodeIsSlave(myself) && myself->slaveof == node) + if (myself->slaveof == node) this_slaves = okslaves; } |