public boolean freeContext(long id) { final SearchContext context = removeContext(id); if (context != null) { assert context.refCount() > 0 : " refCount must be > 0: " + context.refCount(); try { context.indexShard().getSearchOperationListener().onFreeContext(context); if (context.scrollContext() != null) { openScrollContexts.decrementAndGet(); context.indexShard().getSearchOperationListener().onFreeScrollContext(context); } } finally { context.close(); } return true; } return false; }
private void finalizeBulkActions(Throwable e) { updateByQueryContext.searchContext.close(); BulkItemResponse[] bulkResponses = receivedBulkItemResponses.toArray(new BulkItemResponse[receivedBulkItemResponses.size()]); receivedBulkItemResponses.clear(); ShardUpdateByQueryResponse finalResponse = new ShardUpdateByQueryResponse( request.shardId(), matches, updated, bulkResponses ); if (e != null) { finalResponse.failedShardExceptionMessage(ExceptionsHelper.detailedMessage(e)); } finalResponseListener.onResponse(finalResponse); }
public boolean freeContext(long id) { final SearchContext context = removeContext(id); if (context != null) { assert context.refCount() > 0 : " refCount must be > 0: " + context.refCount(); try { context.indexShard().getSearchOperationListener().onFreeContext(context); if (context.scrollContext() != null) { context.indexShard().getSearchOperationListener().onFreeScrollContext(context); } } finally { context.close(); } return true; } return false; }
public boolean freeContext(long id) { final SearchContext context = removeContext(id); if (context != null) { assert context.refCount() > 0 : " refCount must be > 0: " + context.refCount(); try { context.indexShard().getSearchOperationListener().onFreeContext(context); if (context.scrollContext() != null) { context.indexShard().getSearchOperationListener().onFreeScrollContext(context); } } finally { context.close(); } return true; } return false; }
public boolean freeContext(long id) { final SearchContext context = removeContext(id); if (context != null) { assert context.refCount() > 0 : " refCount must be > 0: " + context.refCount(); try { context.indexShard().searchService().onFreeContext(context); if (context.scrollContext() != null) { context.indexShard().searchService().onFreeScrollContext(context); } } finally { context.close(); } return true; } return false; }
context.close(); percolateIndexService.fixedBitSetFilterCache().clear("Done percolating "+requestId); percolateIndexService.fieldData().clear();
context.close(); SearchContext.removeCurrent();
throw new ElasticsearchException("Could not explain", e); } finally { context.close(); SearchContext.removeCurrent();
context.close(); SearchContext.removeCurrent();