if(id == this.id && !this.catchingUp){ this.context.getServerStateManager().saveClusterConfiguration(newConfig); this.logger.info("server has been removed from cluster, step down"); System.exit(0);
if(id == this.id && !this.catchingUp){ this.context.getServerStateManager().saveClusterConfiguration(newConfig); this.logger.info("server has been removed from cluster, step down"); this.stateMachine.exit(0);
if(id == this.id && !this.catchingUp){ this.context.getServerStateManager().saveClusterConfiguration(newConfig); this.logger.info("server has been removed from cluster, step down"); this.stateMachine.exit(0);
if(server != null){ this.config.getServers().remove(server); this.context.getServerStateManager().saveClusterConfiguration(this.config);
if(server != null){ this.config.getServers().remove(server); this.context.getServerStateManager().saveClusterConfiguration(this.config);
ClusterConfiguration newConfig = ClusterConfiguration.fromBytes(logEntry.getValue()); server.logger.info("configuration at index %d is committed", newConfig.getLogIndex()); server.context.getServerStateManager().saveClusterConfiguration(newConfig); server.configChanging = false; if(server.config.getLogIndex() < newConfig.getLogIndex()){
this.context.getServerStateManager().saveClusterConfiguration(this.config); this.state.setCommitIndex(snapshotSyncRequest.getSnapshot().getLastLogIndex()); this.quickCommitIndex = snapshotSyncRequest.getSnapshot().getLastLogIndex();
ClusterConfiguration newConfig = ClusterConfiguration.fromBytes(logEntry.getValue()); server.logger.info("configuration at index %d is committed", newConfig.getLogIndex()); server.context.getServerStateManager().saveClusterConfiguration(newConfig); server.configChanging = false; if(server.config.getLogIndex() < newConfig.getLogIndex()){
ClusterConfiguration newConfig = ClusterConfiguration.fromBytes(logEntry.getValue()); server.logger.info("configuration at index %d is committed", newConfig.getLogIndex()); server.context.getServerStateManager().saveClusterConfiguration(newConfig); server.configChanging = false; if(server.config.getLogIndex() < newConfig.getLogIndex()){
if(server != null){ this.config.getServers().remove(server); this.context.getServerStateManager().saveClusterConfiguration(this.config);
this.context.getServerStateManager().saveClusterConfiguration(this.config); this.state.setCommitIndex(snapshotSyncRequest.getSnapshot().getLastLogIndex()); this.quickCommitIndex = snapshotSyncRequest.getSnapshot().getLastLogIndex();
this.context.getServerStateManager().saveClusterConfiguration(this.config); this.state.setCommitIndex(snapshotSyncRequest.getSnapshot().getLastLogIndex()); this.quickCommitIndex = snapshotSyncRequest.getSnapshot().getLastLogIndex();