Skip to content

fix: QueryIterator checkpoint file bugs on empty/short cp files and f… - #3793

Open
vickyandvicky wants to merge 1 commit into
milvus-io:masterfrom
vickyandvicky:fix-3744-checkpoint-bugs
Open

fix: QueryIterator checkpoint file bugs on empty/short cp files and f…#3793
vickyandvicky wants to merge 1 commit into
milvus-io:masterfrom
vickyandvicky:fix-3744-checkpoint-bugs

Conversation

@vickyandvicky

Copy link
Copy Markdown

…ailed saves

Two related correctness bugs in QueryIterator's checkpoint handling:

  1. __init_cp_file_handler() decided resume-vs-fresh based only on whether the cp file exists, not whether it has usable content. A cp file left behind by a process interrupted before writing anything (0 lines) or interrupted right after the first save (1 line, ts only, no cursor) was incorrectly rejected with ParamError instead of being resumed/started fresh.

  2. next() advanced the in-memory cursor before confirming the checkpoint write succeeded. A failed save left the cursor pointing past a batch that was never actually returned to the caller -- silently dropping that batch on any retry.

Fixes #3744

…ailed saves

Two related correctness bugs in QueryIterator's checkpoint handling:

1. __init_cp_file_handler() decided resume-vs-fresh based only on
   whether the cp file exists, not whether it has usable content. A
   cp file left behind by a process interrupted before writing
   anything (0 lines) or interrupted right after the first save
   (1 line, ts only, no cursor) was incorrectly rejected with
   ParamError instead of being resumed/started fresh.

2. next() advanced the in-memory cursor before confirming the
   checkpoint write succeeded. A failed save left the cursor pointing
   past a batch that was never actually returned to the caller --
   silently dropping that batch on any retry.

Fixes milvus-io#3744

Signed-off-by: Rayudu Vikramaditya <laxion528@gmail.com>
@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vickyandvicky
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot

Copy link
Copy Markdown

Welcome @vickyandvicky! It looks like this is your first PR to milvus-io/pymilvus 🎉

@mergify

mergify Bot commented Sep 13, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: QueryIterator cannot resume from a checkpoint file it left behind, and a failed checkpoint write skips a batch

2 participants