Skip to content

Commit 8edda7b

Browse files
Removed duplicate catch block.
1 parent 5f86ea1 commit 8edda7b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

server/src/main/java/org/elasticsearch/search/SearchService.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import org.elasticsearch.common.util.concurrent.ConcurrentMapLong;
4545
import org.elasticsearch.core.internal.io.IOUtils;
4646
import org.elasticsearch.index.Index;
47-
import org.elasticsearch.index.IndexNotFoundException;
4847
import org.elasticsearch.index.IndexService;
4948
import org.elasticsearch.index.IndexSettings;
5049
import org.elasticsearch.index.engine.Engine;
@@ -558,12 +557,7 @@ final SearchContext createAndPutContext(ShardSearchRequest request) throws IOExc
558557
context.indexShard().getSearchOperationListener().onNewContext(context);
559558
putContext(context);
560559
// ensure that if index is deleted concurrently, we free the context immediately, either here or in afterIndexRemoved
561-
try {
562-
indicesService.indexServiceSafe(request.shardId().getIndex());
563-
} catch (IndexNotFoundException e) {
564-
freeContext(context.id());
565-
throw e;
566-
}
560+
indicesService.indexServiceSafe(request.shardId().getIndex());
567561
success = true;
568562
return context;
569563
} finally {

0 commit comments

Comments
 (0)