ShouldExtendReplicaSetOnState returns true if given a state of instance that's going to be added to the replica set, the replica set size should be extended by 1 more instance for the given operation.
(s InstanceState)
| 1035 | // added to the replica set, the replica set size should be extended by 1 |
| 1036 | // more instance for the given operation. |
| 1037 | func (op Operation) ShouldExtendReplicaSetOnState(s InstanceState) bool { |
| 1038 | return op&(0x10000<<s) > 0 |
| 1039 | } |
| 1040 | |
| 1041 | // All states are healthy, no states extend replica set. |
| 1042 | var allStatesRingOperation = Operation(0x0000ffff) |