Some flags (currently just the NOFAILOVER flag) may need to be updated * in the "myself" node based on the current configuration of the node, * that may change at runtime via CONFIG SET. This function changes the * set of flags in myself->flags accordingly. */
| 465 | * that may change at runtime via CONFIG SET. This function changes the |
| 466 | * set of flags in myself->flags accordingly. */ |
| 467 | void clusterUpdateMyselfFlags(void) { |
| 468 | int oldflags = myself->flags; |
| 469 | int nofailover = server.cluster_slave_no_failover ? |
| 470 | CLUSTER_NODE_NOFAILOVER : 0; |
| 471 | myself->flags &= ~CLUSTER_NODE_NOFAILOVER; |
| 472 | myself->flags |= nofailover; |
| 473 | if (myself->flags != oldflags) { |
| 474 | clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| |
| 475 | CLUSTER_TODO_UPDATE_STATE); |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | void clusterInit(void) { |
| 480 | int saveconf = 0; |
no test coverage detected