Don't use mock wrapper on relocate stress test for now since it could be the reason for intermediate/occational failures
This commit is contained in:
parent
fdc4f72e8a
commit
34d567a133
|
@ -418,6 +418,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
|
|||
public FetchSearchResult executeFetchPhase(FetchSearchRequest request) throws ElasticSearchException {
|
||||
SearchContext context = findContext(request.id());
|
||||
contextProcessing(context);
|
||||
boolean contextFreed = false;
|
||||
try {
|
||||
context.docIdsToLoad(request.docIds(), 0, request.docIdsSize());
|
||||
context.indexShard().searchService().onPreFetchPhase(context);
|
||||
|
@ -425,6 +426,7 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
|
|||
fetchPhase.execute(context);
|
||||
if (context.scroll() == null) {
|
||||
freeContext(request.id());
|
||||
contextFreed = true;
|
||||
} else {
|
||||
contextProcessedSuccessfully(context);
|
||||
}
|
||||
|
@ -433,7 +435,9 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
|
|||
} catch (Throwable e) {
|
||||
context.indexShard().searchService().onFailedFetchPhase(context);
|
||||
logger.trace("Fetch phase failed", e);
|
||||
freeContext(context);
|
||||
if (!contextFreed) {
|
||||
freeContext(context);
|
||||
}
|
||||
throw ExceptionsHelper.convertToRuntime(e);
|
||||
} finally {
|
||||
cleanContext(context);
|
||||
|
|
|
@ -57,7 +57,8 @@ public class SearchWhileRelocatingTests extends ElasticsearchIntegrationTest {
|
|||
private void testSearchAndRelocateConcurrently(int numberOfReplicas) throws Exception {
|
||||
final int numShards = between(10, 20);
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.setSettings(settingsBuilder().put("index.number_of_shards", numShards).put("index.number_of_replicas", numberOfReplicas))
|
||||
.setSettings(settingsBuilder().put("index.number_of_shards", numShards).put("index.number_of_replicas", numberOfReplicas)
|
||||
.put("index.store.type", "niofs"))
|
||||
.addMapping("type1", "loc", "type=geo_point", "test", "type=string").execute().actionGet();
|
||||
ensureGreen();
|
||||
List<IndexRequestBuilder> indexBuilders = new ArrayList<IndexRequestBuilder>();
|
||||
|
|
Loading…
Reference in New Issue