Skip to content

Commit

Permalink
Add 2.9 release notes
Browse files Browse the repository at this point in the history
Signed-off-by: Rishav Sagar <[email protected]>
  • Loading branch information
Rishav Sagar committed Jul 10, 2023
1 parent 9942734 commit d52fd70
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -207,7 +206,7 @@ private Map<String, Object> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Exception> exceptionRef = new AtomicReference<>();
Function<SearchResponse, AsynchronousSearchResponse> responseFunction =
(r) -> null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private void testCase(Client client, SearchRequest request, List<ScriptedBlockPl
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<Exception> exceptionRef = new AtomicReference<>();
CountDownLatch latch = new CountDownLatch(1);
Function<SearchResponse, AsynchronousSearchResponse> responseFunction =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Exception> exceptionRef = new AtomicReference<>();
CountDownLatch latch = new CountDownLatch(1);
Function<SearchResponse, AsynchronousSearchResponse> responseFunction =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<SearchResponse> responseRef = new AtomicReference<>();
AtomicReference<Exception> exceptionRef = new AtomicReference<>();
CountDownLatch latch = new CountDownLatch(1);
Expand Down

0 comments on commit d52fd70

Please sign in to comment.