Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
f3ee2d98
Unverified
Commit
f3ee2d98
authored
May 03, 2021
by
Uri Shachar
Committed by
GitHub
May 03, 2021
Browse files
Fix typos in comments and improve readability (#8899)
parent
ccb76e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
f3ee2d98
...
@@ -3351,10 +3351,10 @@ void clusterHandleSlaveMigration(int max_slaves) {
...
@@ -3351,10 +3351,10 @@ void clusterHandleSlaveMigration(int max_slaves) {
*
*
* Note: this means that eventually a replica migration will occur
* Note: this means that eventually a replica migration will occur
* since slaves that are reachable again always have their FAIL flag
* since slaves that are reachable again always have their FAIL flag
* cleared, so eventually there must be a candidate.
At the same time
* cleared, so eventually there must be a candidate.
*
this does not mean that there are no race conditions possible (two
*
There is a possible race condition causing multiple
* slaves migrat
ing
at the same time
)
, but this is unlikely to
* slaves
to
migrat
e
at the same time, but this is unlikely to
* happen
,
and harmless when
happen
s. */
* happen and
relatively
harmless when
it doe
s. */
candidate
=
myself
;
candidate
=
myself
;
di
=
dictGetSafeIterator
(
server
.
cluster
->
nodes
);
di
=
dictGetSafeIterator
(
server
.
cluster
->
nodes
);
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
...
@@ -3949,7 +3949,7 @@ void clusterUpdateState(void) {
...
@@ -3949,7 +3949,7 @@ void clusterUpdateState(void) {
* master, after a reboot, without giving the cluster a chance to
* master, after a reboot, without giving the cluster a chance to
* reconfigure this node. Note that the delay is calculated starting from
* reconfigure this node. Note that the delay is calculated starting from
* the first call to this function and not since the server start, in order
* the first call to this function and not since the server start, in order
* to
don'
t count the DB loading time. */
* to
no
t count the DB loading time. */
if
(
first_call_time
==
0
)
first_call_time
=
mstime
();
if
(
first_call_time
==
0
)
first_call_time
=
mstime
();
if
(
nodeIsMaster
(
myself
)
&&
if
(
nodeIsMaster
(
myself
)
&&
server
.
cluster
->
state
==
CLUSTER_FAIL
&&
server
.
cluster
->
state
==
CLUSTER_FAIL
&&
...
...
src/module.c
View file @
f3ee2d98
...
@@ -6200,13 +6200,13 @@ int RM_GetClusterNodeInfo(RedisModuleCtx *ctx, const char *id, char *ip, char *m
...
@@ -6200,13 +6200,13 @@ int RM_GetClusterNodeInfo(RedisModuleCtx *ctx, const char *id, char *ip, char *m
*
*
* With the following effects:
* With the following effects:
*
*
* * NO_FAILOVER: prevent Redis Cluster slaves
to
failover a
failing
master.
* * NO_FAILOVER: prevent Redis Cluster slaves
from
fail
ing
over a
dead
master.
* Also disables the replica migration feature.
* Also disables the replica migration feature.
*
*
* * NO_REDIRECTION: Every node will accept any key, without trying to perform
* * NO_REDIRECTION: Every node will accept any key, without trying to perform
* partitioning according to the
user
Redis Cluster algorithm.
* partitioning according to the Redis Cluster algorithm.
* Slots information
s
will still be propagated across the
* Slots information will still be propagated across the
* cluster, but without effect
s
. */
* cluster, but without effect. */
void
RM_SetClusterFlags
(
RedisModuleCtx
*
ctx
,
uint64_t
flags
)
{
void
RM_SetClusterFlags
(
RedisModuleCtx
*
ctx
,
uint64_t
flags
)
{
UNUSED
(
ctx
);
UNUSED
(
ctx
);
if
(
flags
&
REDISMODULE_CLUSTER_FLAG_NO_FAILOVER
)
if
(
flags
&
REDISMODULE_CLUSTER_FLAG_NO_FAILOVER
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment