Repository navigation
feat: forward SearchIteratorV2 cursor across pages - #645
jamesgao-jpg wants to merge 1 commit into
Conversation
Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jamesgao-jpg The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @jamesgao-jpg! It looks like this is your first PR to milvus-io/milvus-sdk-cpp 🎉 |
|
Tick the box to add this pull request to the merge queue (same as
|
| } | ||
|
|
||
| auto params = request->search_params(); | ||
| std::string expected_cursor = (!v1 && page_idx > 0) ? ("cursor-" + std::to_string(page_idx)) : ""; |
There was a problem hiding this comment.
test/it/v1/TestSearchIterator.cpp line:91
High ---- The mock returns cursor "cursor-<page_idx>", but SearchIteratorV2Impl::next() only echoes the cursor from the PREVIOUS response into the next request. On the second real page (page_idx=1) the request carries "cursor-0" while expected_cursor is "cursor-1", so this EXPECT_EQ fails and testing-it will fail once the "Build and test" CI run is approved. Use "cursor-" + std::to_string(page_idx - 1) (for page_idx > 0) so the assertion matches the previous page's cursor that the iterator actually forwards.
Bump
PROTO_COMMITincmake/MilvusProtoGen.cmaketoa752bd706b7bf9e2ea7d930d1dff34aa95696ba6(from milvus-io/milvus-proto#703) and forwardSearchIteratorV2Results.cursor()viasearch_iter_cursoron everySearchIteratorV2Implpage while keepingsearch_iter_id(token()) unchanged.Context