use of io.dingodb.raft.entity.RaftOutter.SnapshotMeta in project dingo by dingodb.
the class SnapshotExecutorImpl method installSnapshot.
@Override
public void installSnapshot(final RpcRequests.InstallSnapshotRequest request, final RpcRequests.InstallSnapshotResponse.Builder response, final RpcRequestClosure done) {
final SnapshotMeta meta = request.getMeta();
final DownloadingSnapshot ds = new DownloadingSnapshot(request, response, done);
// as the retry snapshot will replace this one.
if (!registerDownloadingSnapshot(ds)) {
LOG.warn("Fail to register downloading snapshot.");
// This RPC will be responded by the previous session
return;
}
Requires.requireNonNull(this.curCopier, "curCopier");
try {
this.curCopier.join();
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
LOG.warn("Install snapshot copy job was canceled.");
return;
}
loadDownloadingSnapshot(ds, meta);
}
Aggregations