Пример #1
0
 @Override
 public void messageReceived(
     RecoveryPrepareForTranslogOperationsRequest request, TransportChannel channel)
     throws Exception {
   try (RecoveriesCollection.StatusRef statusRef =
       onGoingRecoveries.getStatusSafe(request.recoveryId(), request.shardId())) {
     final RecoveryStatus recoveryStatus = statusRef.status();
     recoveryStatus.state().getTranslog().totalOperations(request.totalTranslogOps());
     recoveryStatus.indexShard().skipTranslogRecovery();
   }
   channel.sendResponse(TransportResponse.Empty.INSTANCE);
 }
 @Override
 public void messageReceived(
     RecoveryPrepareForTranslogOperationsRequest request, TransportChannel channel)
     throws Exception {
   try (RecoveriesCollection.RecoveryRef recoveryRef =
       onGoingRecoveries.getRecoverySafe(request.recoveryId(), request.shardId())) {
     recoveryRef
         .status()
         .prepareForTranslogOperations(
             request.totalTranslogOps(), request.getMaxUnsafeAutoIdTimestamp());
   }
   channel.sendResponse(TransportResponse.Empty.INSTANCE);
 }