use of com.eightkdata.mongowp.exceptions.InconsistentReplicaSetNamesException in project torodb by torodb.
the class TopologyHeartbeatHandler method start.
CompletableFuture<Status<ReplicaSetConfig>> start(HostAndPort seed) {
executor.addVersionChangeListener(versionChangeListener);
return executor.onCurrentVersion().andThenApplyAsync(networkHandler.askForConfig(new RemoteCommandRequest<>(seed, "admin", Empty.getInstance())), (coord, remoteConfig) -> {
Status<ReplicaSetConfig> result = remoteConfig.asStatus();
if (!result.isOk()) {
return result;
}
ReplicaSetConfig replConfig = result.getResult();
try {
checkRemoteReplSetConfig(replConfig);
updateConfig(coord, replConfig);
return result;
} catch (InconsistentReplicaSetNamesException ex) {
return Status.from(ex);
}
});
}
Aggregations