BlobRecoveryTransferStatus transferStatus = onGoingRecovery.onGoingTransfers().get(request.transferId());
BlobShard shard = onGoingRecovery.blobShard;
if (onGoingRecovery.canceled()) {
onGoingRecovery.sentCanceledToSource();
throw new IndexShardClosedException(onGoingRecovery.shardId());
}
if (transferStatus == null) {
throw new IndexShardClosedException(onGoingRecovery.shardId());
}
BytesReference content = request.content();
if (!content.hasArray()) {
content = content.toBytesArray();