private synchronized boolean add() { checkForCancel(); threads.add(Thread.currentThread()); // capture and clean the interrupted thread before we start, so we can identify // our own interrupt. we do so under lock so we know we don't clear our own. return Thread.interrupted(); }
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel();
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel();
cancellableThreads.checkForCancel(); cancellableThreads.checkForCancel(); logger.debug("checking integrity for file {} after remove corruption exception", md); if (store.checkIntegrityNoException(md) == false) { // we are corrupted on the primary -- fail!
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel(); StopWatch stopWatch = new StopWatch().start(); logger.trace("finalizing recovery");
private synchronized boolean add() { checkForCancel(); threads.add(Thread.currentThread()); // capture and clean the interrupted thread before we start, so we can identify // our own interrupt. we do so under lock so we know we don't clear our own. return Thread.interrupted(); }
private synchronized boolean add() { checkForCancel(); threads.add(Thread.currentThread()); // capture and clean the interrupted thread before we start, so we can identify // our own interrupt. we do so under lock so we know we don't clear our own. return Thread.interrupted(); }
private synchronized boolean add() { checkForCancel(); threads.add(Thread.currentThread()); // capture and clean the interrupted thread before we start, so we can identify // our own interrupt. we do so under lock so we know we don't clear our own. return Thread.interrupted(); }
private synchronized boolean add() { checkForCancel(); threads.add(Thread.currentThread()); // capture and clean the interrupted thread before we start, so we can identify // our own interrupt. we do so under lock so we know we don't clear our own. return Thread.interrupted(); }
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel();
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel();
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel(); StopWatch stopWatch = new StopWatch().start(); logger.trace("[{}][{}] finalizing recovery to {}", indexName, shardId, request.targetNode());
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel();
/** * Perform phase2 of the recovery process * <p> * Phase2 takes a snapshot of the current translog *without* acquiring the * write lock (however, the translog snapshot is a point-in-time view of * the translog). It then sends each translog operation to the target node * so it can be replayed into the new shard. */ public void phase2(Translog.Snapshot snapshot) { if (shard.state() == IndexShardState.CLOSED) { throw new IndexShardClosedException(request.shardId()); } cancellableThreads.checkForCancel(); StopWatch stopWatch = new StopWatch().start(); logger.trace("{} recovery [phase2] to {}: sending transaction log operations", request.shardId(), request.targetNode()); // Send all the snapshot's translog operations to the target int totalOperations = sendSnapshot(snapshot); stopWatch.stop(); logger.trace("{} recovery [phase2] to {}: took [{}]", request.shardId(), request.targetNode(), stopWatch.totalTime()); response.phase2Time = stopWatch.totalTime().millis(); response.phase2Operations = totalOperations; }
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel(); operations.add(operation); ops += 1;
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel(); StopWatch stopWatch = new StopWatch().start(); logger.trace("finalizing recovery");
@Override protected void doRun() { cancellableThreads.checkForCancel(); store.incRef(); final StoreFileMetaData md = recoverySourceMetadata.get(name);
/** * Perform phase2 of the recovery process * <p> * Phase2 takes a snapshot of the current translog *without* acquiring the * write lock (however, the translog snapshot is a point-in-time view of * the translog). It then sends each translog operation to the target node * so it can be replayed into the new shard. */ public void phase2(Translog.Snapshot snapshot) { if (shard.state() == IndexShardState.CLOSED) { throw new IndexShardClosedException(request.shardId()); } cancellableThreads.checkForCancel(); StopWatch stopWatch = new StopWatch().start(); logger.trace("{} recovery [phase2] to {}: sending transaction log operations", request.shardId(), request.targetNode()); // Send all the snapshot's translog operations to the target int totalOperations = sendSnapshot(snapshot); stopWatch.stop(); logger.trace("{} recovery [phase2] to {}: took [{}]", request.shardId(), request.targetNode(), stopWatch.totalTime()); response.phase2Time = stopWatch.totalTime().millis(); response.phase2Operations = totalOperations; }
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel(); operations.add(operation); ops += 1;
throw new IndexShardClosedException(request.shardId()); cancellableThreads.checkForCancel(); StopWatch stopWatch = new StopWatch().start(); logger.trace("[{}][{}] finalizing recovery to {}", indexName, shardId, request.targetNode());