Unverified Commit f3ee2d98 authored by Uri Shachar's avatar Uri Shachar Committed by GitHub
Browse files

Fix typos in comments and improve readability (#8899)

parent ccb76e56
...@@ -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 migrating at the same time), but this is unlikely to * slaves to migrate at the same time, but this is unlikely to
* happen, and harmless when happens. */ * happen and relatively harmless when it does. */
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 not 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 &&
......
...@@ -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 failing 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 informations will still be propagated across the * Slots information will still be propagated across the
* cluster, but without effects. */ * 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)
......
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