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. */
| 480 | * that may change at runtime via CONFIG SET. This function changes the |
| 481 | * set of flags in myself->flags accordingly. */ |
| 482 | void clusterUpdateMyselfFlags(void) { |
| 483 | int oldflags = myself->flags; |
| 484 | int nofailover = g_pserver->cluster_slave_no_failover ? |
| 485 | CLUSTER_NODE_NOFAILOVER : 0; |
| 486 | myself->flags &= ~CLUSTER_NODE_NOFAILOVER; |
| 487 | myself->flags |= nofailover; |
| 488 | if (myself->flags != oldflags) { |
| 489 | clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG| |
| 490 | CLUSTER_TODO_UPDATE_STATE); |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | void clusterInit(void) { |
| 495 | int saveconf = 0; |
no test coverage detected