synchronized(peer){ peer.setNextLogIndex(response.getNextIndex()); peer.setMatchedIndex(response.getNextIndex() - 1);
synchronized(peer){ peer.setNextLogIndex(response.getNextIndex()); peer.setMatchedIndex(response.getNextIndex() - 1);
synchronized(peer){ peer.setNextLogIndex(response.getNextIndex()); peer.setMatchedIndex(response.getNextIndex() - 1);
this.logger.debug("snapshot sync is done"); peer.setNextLogIndex(context.getSnapshot().getLastLogIndex() + 1); peer.setMatchedIndex(context.getSnapshot().getLastLogIndex()); peer.setSnapshotInSync(null); needToCatchup = peer.clearPendingCommit() || response.getNextIndex() < this.logStore.getFirstAvailableIndex();
this.logger.debug("snapshot sync is done"); peer.setNextLogIndex(context.getSnapshot().getLastLogIndex() + 1); peer.setMatchedIndex(context.getSnapshot().getLastLogIndex()); peer.setSnapshotInSync(null); needToCatchup = peer.clearPendingCommit() || response.getNextIndex() < this.logStore.getFirstAvailableIndex();
this.logger.debug("snapshot sync is done"); peer.setNextLogIndex(context.getSnapshot().getLastLogIndex() + 1); peer.setMatchedIndex(context.getSnapshot().getLastLogIndex()); peer.setSnapshotInSync(null); needToCatchup = peer.clearPendingCommit() || response.getNextIndex() < this.logStore.getFirstAvailableIndex();
this.serverToJoin.setMatchedIndex(response.getNextIndex() - 1); this.syncLogsToNewComingServer(response.getNextIndex()); this.serverToJoin.setSnapshotInSync(null); this.serverToJoin.setNextLogIndex(context.getSnapshot().getLastLogIndex() + 1); this.serverToJoin.setMatchedIndex(context.getSnapshot().getLastLogIndex()); }else{ context.setOffset(response.getNextIndex());
this.serverToJoin.setMatchedIndex(response.getNextIndex() - 1); this.syncLogsToNewComingServer(response.getNextIndex()); this.serverToJoin.setSnapshotInSync(null); this.serverToJoin.setNextLogIndex(context.getSnapshot().getLastLogIndex() + 1); this.serverToJoin.setMatchedIndex(context.getSnapshot().getLastLogIndex()); }else{ context.setOffset(response.getNextIndex());
this.serverToJoin.setMatchedIndex(response.getNextIndex() - 1); this.syncLogsToNewComingServer(response.getNextIndex()); this.serverToJoin.setSnapshotInSync(null); this.serverToJoin.setNextLogIndex(context.getSnapshot().getLastLogIndex() + 1); this.serverToJoin.setMatchedIndex(context.getSnapshot().getLastLogIndex()); }else{ context.setOffset(response.getNextIndex());