Skip to content

Commit

Permalink
Merge b78e915 into b255fa2
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-techie committed Jun 27, 2023
2 parents b255fa2 + b78e915 commit cfef3fb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
distribution = 'oss-zip'
opensearch_group = "org.opensearch"
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
opensearch_version = System.getProperty("opensearch.version", "2.8.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.9.0-SNAPSHOT")
opensearch_plugin_version = System.getProperty("bwc.version", "1.1.0.0")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
// 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.opensearch.search.asynchronous.service.AsynchronousSearchPersistenceService;
import org.opensearch.search.asynchronous.response.AcknowledgedResponse;
import org.opensearch.search.asynchronous.service.AsynchronousSearchService;
import com.carrotsearch.hppc.cursors.ObjectCursor;
import org.opensearch.OpenSearchException;
import org.opensearch.Version;
import org.opensearch.cluster.ClusterChangedEvent;
Expand Down Expand Up @@ -197,8 +196,8 @@ private static IndexMetadata createIndexMetadata(final Index index, final long v
// Create the routing table for a cluster state.
private static RoutingTable createRoutingTable(final long version, final Metadata metadata) {
final RoutingTable.Builder builder = RoutingTable.builder().version(version);
for (ObjectCursor<IndexMetadata> cursor : metadata.indices().values()) {
builder.addAsNew(cursor.value);
for (IndexMetadata cursor : metadata.indices().values()) {
builder.addAsNew(cursor);
}
return builder.build();
}
Expand Down

0 comments on commit cfef3fb

Please sign in to comment.