private RaftRequestMessage createSyncSnapshotRequest(PeerServer peer, long lastLogIndex, long term, long commitIndex){ synchronized(peer){ SnapshotSyncContext context = peer.getSnapshotSyncContext(); Snapshot snapshot = context == null ? null : context.getSnapshot(); Snapshot lastSnapshot = this.stateMachine.getLastSnapshot(); long offset = peer.getSnapshotSyncContext().getOffset(); long sizeLeft = snapshot.getSize() - offset; int blockSize = this.getSnapshotSyncBlockSize();
private RaftRequestMessage createSyncSnapshotRequest(PeerServer peer, long lastLogIndex, long term, long commitIndex){ synchronized(peer){ SnapshotSyncContext context = peer.getSnapshotSyncContext(); Snapshot snapshot = context == null ? null : context.getSnapshot(); Snapshot lastSnapshot = this.stateMachine.getLastSnapshot(); long offset = peer.getSnapshotSyncContext().getOffset(); long sizeLeft = snapshot.getSize() - offset; int blockSize = this.getSnapshotSyncBlockSize();
private RaftRequestMessage createSyncSnapshotRequest(PeerServer peer, long lastLogIndex, long term, long commitIndex){ synchronized(peer){ SnapshotSyncContext context = peer.getSnapshotSyncContext(); Snapshot snapshot = context == null ? null : context.getSnapshot(); Snapshot lastSnapshot = this.stateMachine.getLastSnapshot(); long offset = peer.getSnapshotSyncContext().getOffset(); long sizeLeft = snapshot.getSize() - offset; int blockSize = this.getSnapshotSyncBlockSize();
if(response.isAccepted()){ synchronized(peer){ SnapshotSyncContext context = peer.getSnapshotSyncContext(); if(context == null){ this.logger.info("no snapshot sync context for this peer, drop the response");
if(response.isAccepted()){ synchronized(peer){ SnapshotSyncContext context = peer.getSnapshotSyncContext(); if(context == null){ this.logger.info("no snapshot sync context for this peer, drop the response");
if(response.isAccepted()){ synchronized(peer){ SnapshotSyncContext context = peer.getSnapshotSyncContext(); if(context == null){ this.logger.info("no snapshot sync context for this peer, drop the response");
SnapshotSyncContext context = this.serverToJoin.getSnapshotSyncContext(); if(context == null){ this.logger.error("Bug! SnapshotSyncContext must not be null");
SnapshotSyncContext context = this.serverToJoin.getSnapshotSyncContext(); if(context == null){ this.logger.error("Bug! SnapshotSyncContext must not be null");
SnapshotSyncContext context = this.serverToJoin.getSnapshotSyncContext(); if(context == null){ this.logger.error("Bug! SnapshotSyncContext must not be null");