Search in sources :

Example 1 with SnapshotMeta

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);
}
Also used : SnapshotMeta(io.dingodb.raft.entity.RaftOutter.SnapshotMeta)

Aggregations

SnapshotMeta (io.dingodb.raft.entity.RaftOutter.SnapshotMeta)1