From d52fd704131956e7399fcc1a34ad35e7d373e93a Mon Sep 17 00:00:00 2001 From: Rishav Sagar Date: Mon, 10 Jul 2023 20:03:59 +0530 Subject: [PATCH] Add 2.9 release notes Signed-off-by: Rishav Sagar --- .../opensearch-asynchronous-search.release-notes-2.9.0.0.md | 6 ++++++ .../asynchronous/response/AsynchronousSearchResponse.java | 5 ++--- .../transport/TransportSubmitAsynchronousSearchAction.java | 2 +- .../integTests/AsynchronousSearchRejectionIT.java | 2 +- .../listener/AsynchronousSearchCancellationIT.java | 2 +- .../listener/AsynchronousSearchPartialResponseIT.java | 2 +- .../listener/AsynchronousSearchProgressListenerIT.java | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 release-notes/opensearch-asynchronous-search.release-notes-2.9.0.0.md diff --git a/release-notes/opensearch-asynchronous-search.release-notes-2.9.0.0.md b/release-notes/opensearch-asynchronous-search.release-notes-2.9.0.0.md new file mode 100644 index 00000000..ef061a05 --- /dev/null +++ b/release-notes/opensearch-asynchronous-search.release-notes-2.9.0.0.md @@ -0,0 +1,6 @@ +## Version 2.9.0.0 2023-07-18 + +Compatible with OpenSearch 2.9.0 + +### Maintenance +* Increment version to 2.9.0 ([300](https://github.com/opensearch-project/asynchronous-search/pull/300)) diff --git a/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java b/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java index 20810a26..c38e7253 100644 --- a/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java +++ b/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java @@ -5,7 +5,6 @@ package org.opensearch.search.asynchronous.response; -import org.opensearch.BaseExceptionsHelper; import org.opensearch.core.ParseField; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; @@ -124,7 +123,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } if (error != null) { builder.startObject(ERROR.getPreferredName()); - BaseExceptionsHelper.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, error); + OpenSearchException.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, error); builder.endObject(); } builder.endObject(); @@ -207,7 +206,7 @@ private Map getErrorAsMap(OpenSearchException exception) throws BytesReference error; try (XContentBuilder builder = XContentFactory.contentBuilder(Requests.INDEX_CONTENT_TYPE)) { builder.startObject(); - BaseExceptionsHelper.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, exception); + OpenSearchException.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, exception); builder.endObject(); error = BytesReference.bytes(builder); return convertToMap(error, false, Requests.INDEX_CONTENT_TYPE).v2(); diff --git a/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java b/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java index 06151805..1e35d960 100644 --- a/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java @@ -72,7 +72,7 @@ protected void doExecute(Task task, SubmitAsynchronousSearchRequest request, Act try { final long relativeStartTimeInMillis = threadPool.relativeTimeInMillis(); asynchronousSearchContext = asynchronousSearchService.createAndStoreContext(request, relativeStartTimeInMillis, - () -> searchService.aggReduceContextBuilder(request.getSearchRequest()), user); + () -> searchService.aggReduceContextBuilder(request.getSearchRequest().source()), user); assert asynchronousSearchContext.getAsynchronousSearchProgressListener() != null : "missing progress listener for an active context"; AsynchronousSearchProgressListener progressListener = asynchronousSearchContext.getAsynchronousSearchProgressListener(); diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java index e2981c01..2a9c6506 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java @@ -189,7 +189,7 @@ public void testSearchFailures() throws Exception { AtomicInteger reduceContextInvocation = new AtomicInteger(); AsynchronousSearchProgressListener listener; SearchService service = internalCluster().getInstance(SearchService.class); - InternalAggregation.ReduceContextBuilder reduceContextBuilder = service.aggReduceContextBuilder(request); + InternalAggregation.ReduceContextBuilder reduceContextBuilder = service.aggReduceContextBuilder(request.source()); AtomicReference exceptionRef = new AtomicReference<>(); Function responseFunction = (r) -> null; diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java index 422d0b78..93c3be97 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java @@ -120,7 +120,7 @@ private void testCase(Client client, SearchRequest request, List exceptionRef = new AtomicReference<>(); CountDownLatch latch = new CountDownLatch(1); Function responseFunction = diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java index aa91b909..deace270 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java @@ -119,7 +119,7 @@ private void testCase(Client client, SearchRequest request) throws Exception { try { threadPool = new TestThreadPool(AsynchronousSearchProgressListenerIT.class.getName()); SearchService service = internalCluster().getInstance(SearchService.class); - InternalAggregation.ReduceContextBuilder reduceContextBuilder = service.aggReduceContextBuilder(request); + InternalAggregation.ReduceContextBuilder reduceContextBuilder = service.aggReduceContextBuilder(request.source()); AtomicReference exceptionRef = new AtomicReference<>(); CountDownLatch latch = new CountDownLatch(1); Function responseFunction = diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java index 80ab11a4..48fba6fd 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java @@ -138,7 +138,7 @@ private void testCase(NodeClient client, SearchRequest request) throws Interrupt try { threadPool = new TestThreadPool(AsynchronousSearchProgressListenerIT.class.getName()); SearchService service = getInstanceFromNode(SearchService.class); - InternalAggregation.ReduceContextBuilder reduceContextBuilder = service.aggReduceContextBuilder(request); + InternalAggregation.ReduceContextBuilder reduceContextBuilder = service.aggReduceContextBuilder(request.source()); AtomicReference responseRef = new AtomicReference<>(); AtomicReference exceptionRef = new AtomicReference<>(); CountDownLatch latch = new CountDownLatch(1);