Skip to content

[Bug]: PLE gather reissues already-prefetched reordered and duplicate keys #2622

Closed as not planned

Description

@hotschmoe

What happened

PleTable::gather_batch uses positional equality for Direct-mode prefetched keys. After prefetching A,B,C,D,E,F, gathering D,E,F,A,B,C reissues 96 requested rows even though every 16-row vector is already prefetched. Prefetching A once and gathering A,A,A reissues 48 requested rows because prefetches are deduplicated while the fast path requires at least as many slots as requested tokens.

Expected: reuse existing immutable prefetched slots and decode into requested order. This is a redundant-request mechanism; no serving latency or physical disk-I/O saving is claimed.

There is also a related cleanup defect in the same successful-match branch: on the first failed collect, it clears n_prefetch without draining subsequent outstanding tickets. A narrow proposed fix drains all tickets, preserves the first error, and returns without decoding after a failure. Failure handling is source-reviewed; runtime fault injection has not been performed.

Reproduction: open a finite tiny IQ4_NL GGUF in Direct mode, call prefetch_rows for the vectors above, and compare the requested-row counter in io_report before/after gather_batch. Exact executed fixture and evidence. The fixture's local include path needs adjustment outside its original checkout.

Strata version, GPU, OS

Upstream main 296b59d (0.1.44.1), Linux; CPU-only PleTable/PleReader/DirectFile reproduction, g++ 13.3.0, C++17/O2/pthreads. No GPU access required. Shared PleTable with the SYCL tree's host reader/file implementation was tested; full CUDA/HIP backend builds are not claimed.

Engine log

Both baseline and patched CPU harnesses exit 0, 44 cases per arm (88 total): 11 cases x cache 0/256 x worker off/on. All successful output bytes match an independently opened Mmap reference, and guards, finite references, logical byte accounting and request counts pass. Permutation: 96 -> 0 additional requested rows; duplicates: 48 -> 0; subset: 32 -> 0; extra-prefetch subset: 16 -> 0. Missing/over-limit/pending behavior retains expected counts. Runtime fault injection and out-of-range coverage are absent.

Searched existing issues/PRs on 2026-10-15 for PLE prefetch, gather_batch and prefetch_keys. Related PRs #1516, #2073 and #2326 touch this area but retain positional matching; no exact duplicate was found. Search is keyword-based, not an exhaustive review of every open diff.

Activity

  1. added a commit that references this issue on Oct 17, 2026
    a3f9c76
  2. Niko1221 commented on Oct 19, 2026

    @Niko1221
    Owner

    Thanks for taking the time to report this.

    We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

    To reopen it takes about two minutes:

    1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
    2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
    3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
    4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

    The rules are in CONTRIBUTING.md.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions