File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
server/src/main/java/org/elasticsearch/indices/recovery Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -727,10 +727,6 @@ protected void doRun() throws Exception {
727
727
while (true ) {
728
728
assert semaphore .availablePermits () == 0 ;
729
729
cancellableThreads .checkForCancel ();
730
- if (error .get () != null ) {
731
- handleErrorOnSendFiles (store , error .get ().v2 (), new StoreFileMetaData []{error .get ().v1 ()});
732
- throw error .get ().v2 ();
733
- }
734
730
if (canSendMore () == false ) {
735
731
semaphore .release ();
736
732
// Here we have to retry before abort to avoid a race situation where the other threads have flipped `canSendMore`
@@ -740,6 +736,10 @@ protected void doRun() throws Exception {
740
736
break ;
741
737
}
742
738
}
739
+ if (error .get () != null ) {
740
+ handleErrorOnSendFiles (store , error .get ().v2 (), new StoreFileMetaData []{error .get ().v1 ()});
741
+ throw error .get ().v2 ();
742
+ }
743
743
final FileChunk chunk = readNextChunk ();
744
744
if (chunk == null ) {
745
745
semaphore .release (); // allow other threads respond if we are not done yet.
You can’t perform that action at this time.
0 commit comments