replication: refactor replicaset_connect()
replicaset_connect() sleeps in a loop while waiting for the connections to be established and checks a bunch of conditions in between the loop cycles to check if it can proceed (with either a success or a failure). The conditions are already quite complicated and multiple, but it's going to get worse with the addition of bootstrap_strategy "config" and "supervised": during bootstrap replicaset_connect() will proceed as soon as the configured bootstrap leader is connected. Factor all these checks out to a helper function for simplicity. Part-of #7999 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
Please register or sign in to comment