Skip to content

[BUG] Indexing gives up on a file after one transient network error (batch retries removed in PR #34) #58

Closed as duplicate

Description

@simurg79

Type

Bug — regression from PR #34

Problem / Value

A single transient network error while writing a file to the vector store now fails that file for the rest of the session. Before PR #34, the scanner retried each embed + upsert batch up to 3 times with exponential backoff. The new write path has no retry at all, so a one-off blip leaves the index partial and (through #57) blocks codebase_search for hours.

Context

Observed 2026-11-02 09:18:13 PST during a full scan (renderer.log): [Extension Host] Failed to upsert points: TypeError: fetch failed. Qdrant v1.16.3 runs on localhost in Docker.

Reproduction

  1. Start a scan or a file-watcher update.
  2. Inject one transient failure: make the first client.upsert call in upsertPoints throw new TypeError("fetch failed"), or docker stop qdrant briefly during a write and start it again.
  3. Expected: the batch is retried and the file completes. Actual: the file fails immediately and the scan or batch is marked incomplete.

Acceptance criteria

  • Transient failures in a file's embed, upsert, delete, or verify steps are retried with bounded exponential backoff (keep 3 attempts / 500 ms base unless there is a reason to change it).
  • "Transient" means connection-level errors (fetch failed, ECONNRESET, ECONNREFUSED, ETIMEDOUT, closed socket), HTTP 5xx, and 429. Validation/4xx errors and parser failures are not retried.
  • Retries respect the abort signal, the write gate, and generation fencing: a superseded or cancelled attempt never writes after cancellation.
  • Each retry and the final failure are logged with the file path and error ([ENHANCEMENT] Log code-index failures and state changes so a stuck index can be diagnosed #60).
  • Tests: one transient upsert failure followed by success → file completes; persistent failure → fails after the maximum attempts; abort during backoff → stops promptly with no further writes.

Constraints/Preferences

Related: PR #34, #57, #60

Activity

  1. simurg79 commented on Nov 3, 2026

    @simurg79
    OwnerAuthor

    Consolidated into #57, which now tracks all four parts of this incident (retry, recovery, Start Indexing race, logging) with the full evidence.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions