Skip to content

Commit

Permalink
QueryIterator/SearchIterator support retry (#1270)
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <[email protected]>
  • Loading branch information
yhmo authored Dec 31, 2024
1 parent 417fbb8 commit 70c0802
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 192 deletions.
3 changes: 1 addition & 2 deletions src/main/java/io/milvus/orm/iterator/QueryIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ private List<QueryResultsWrapper.RowRecord> getQueryResultsWrapper(String expr,
.build();

QueryRequest queryRequest = ParamUtils.convertQueryParam(queryParam);
QueryResults response = blockingStub.query(queryRequest);

QueryResults response = rpcUtils.retry(()->blockingStub.query(queryRequest));
String title = String.format("QueryRequest collectionName:%s", queryIteratorParam.getCollectionName());
rpcUtils.handleResponse(title, response.getStatus());

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/milvus/orm/iterator/SearchIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private SearchResultsWrapper executeNextSearch(Map<String, Object> params, Strin
fillVectorsByPlType(searchParamBuilder);

SearchRequest searchRequest = ParamUtils.convertSearchParam(searchParamBuilder.build());
SearchResults response = blockingStub.search(searchRequest);
SearchResults response = rpcUtils.retry(()->blockingStub.search(searchRequest));

String title = String.format("SearchRequest collectionName:%s", searchIteratorParam.getCollectionName());
rpcUtils.handleResponse(title, response.getStatus());
Expand Down
Loading

0 comments on commit 70c0802

Please sign in to comment.