Skip to content

Commit

Permalink
QueryIterator/SearchIterator support retry
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <[email protected]>
  • Loading branch information
yhmo committed Dec 31, 2024
1 parent f5462d5 commit c8d7933
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ private QueryResults executeQuery(String expr, long offset, long limit, long ts)
// set default consistency level
builder.setUseDefaultConsistency(true);

QueryResults response = blockingStub.query(builder.build());
QueryResults response = rpcUtils.retry(()->blockingStub.query(builder.build()));
String title = String.format("QueryRequest collectionName:%s", queryIteratorParam.getCollectionName());
rpcUtils.handleResponse(title, response.getStatus());
return response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private SearchResults executeSearch(Map<String, Object> params, String nextExpr,
// set default consistency level
builder.setUseDefaultConsistency(true);

SearchResults response = blockingStub.search(builder.build());
SearchResults response = rpcUtils.retry(()->blockingStub.search(builder.build()));
String title = String.format("SearchRequest collectionName:%s", searchIteratorParam.getCollectionName());
rpcUtils.handleResponse(title, response.getStatus());
return response;
Expand Down
Loading

0 comments on commit c8d7933

Please sign in to comment.