mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 21:05:40 +07:00
[GH-ISSUE #2622] [Bug]: PLE gather reissues already-prefetched reordered and duplicate keys #1046
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1046
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hotschmoe on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2622
What happened
PleTable::gather_batchuses 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
296b59d2f7(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.
@Niko1221 commented on GitHub (Oct 19, 2026):
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:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.