mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3046] [CLOSED] ngram: avoid draining nonexistent reads after initialization failures #4420
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#4420
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3046
Author: @j-luwierski
Created: 10/18/2026
Status: ❌ Closed
Base:
main← Head:codex/ple-reader-init-cleanup📝 Commits (1)
ad5a36bngram: avoid draining nonexistent reads after initialization failures📊 Changes
3 files changed (+136 additions, -1 deletions)
View changed files
📝
CMakeLists.txt(+19 -0)📝
src/ngram/ple_reader.cpp(+3 -1)➕
tests/platform/ple_reader_lifecycle.cpp(+114 -0)📄 Description
Title
Resolves #3045
Summary
PleReader::open()can block forever during cleanup before submitting any reads: slab allocation failure publishes a nonzero slot count with no free slots, and failed reopen inherits the previous slot count after close cleared the free slots. Both paths wait for completions that cannot exist. Failed initialization now returns the existing error, closes the file and permits a later valid open.What changed
max_inflightonly after the slab and free-slot list are initialized.max_inflightwhen closing the reader.posix_memalignwrapping injects a one-shot ENOMEM without adding production fault-injection settings. CTest timeouts turn the former hangs into bounded failures.Successful row reads, page-straddling rows, close with outstanding reads, repeated close and read-after-recovery are covered. The I/O scheduling, cache, kernels, row bytes, defaults and public API remain unchanged.
Validation
Linux x86_64, GCC 14.2.0; isolated branch from directly fetched upstream main
477ac13cbe8e582c20484871ce459d20d82df09d.STRATA_BUILD_TESTS=ONandSTRATA_WERROR=ON: builtple_reader_lifecycle_testanddirect_file_async_test.git diff --checkpassed.Extra Notes
Draft; no review requested. AGENTS.md requires builds of every affected backend before review. Full CUDA/HIP/SYCL engine builds have not been run; HIP and SYCL compilers are unavailable here. Windows runtime behavior and real model inference were not tested. These are injected/API error-path tests, not a measured production memory-pressure incident.
Searched open issues and PRs. #2991 concerns temporary-file collisions in another selftest; #2623 concerns prefetch matching. This change addresses initialization bookkeeping only.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.