mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #2124] [MERGED] dstorage: reads into physical pages wait for the title's Submit (DSTORAGE-HOLD-PAGE-READS) #2129
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2129
Loading…
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/ubiquitarianism/leonida/pull/2124
Author: @QemmHD
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:claude/dstorage-hold-page-reads📝 Commits (1)
6b09de4dstorage: reads into physical pages wait for the title's Submit📊 Changes
4 files changed (+456 additions, -12 deletions)
View changed files
📝
docs/directstorage.md(+16 -2)📝
runtime/shims/dstorage.cpp(+162 -10)➕
runtime/src/dstorage_hold.h(+23 -0)📝
runtime/test/dstorage_test.cpp(+255 -0)📄 Description
A queue with auto-submit on submits itself once the entries enqueued since the last submit reach half its capacity (
enqueue()→submit_locked()). A request into physical pages names its pages throughDestinationPageArray, which the worker reads only when the request runs (publish()→page_transfer()). The title fills that page table just before it calls Submit. So a read started by the self-submit finds page 0 (the entry fails with E_INVALIDARG) or the page number the slot held before (the data lands in a page that now belongs to something else, with no error).LEONIDA_DSTORAGE_HOLD_MSbounds a hold (2000 ms by default, 0 for no limit), so a path that never calls Submit cannot stall for good.LEONIDA_DSTORAGE_HOLD_PAGES=0restores the old behaviour.[rt] ds-holdcounts self-submits, held reads, full-queue and timed releases, and page lists that were still empty when read.Tests (Windows 11, RTX 4070 SUPER, VS 2022, Ninja)
dstorage_testwith the newtest_page_reads_wait_for_submit: 551 checks pass. WithLEONIDA_DSTORAGE_HOLD_PAGES=0, 15 of them fail: the read lands in the page the list named before, and an empty list fails.test_runtime_pathsworkflow check fails, as on main.Idea from fxceless/victory-fork 79cfdd9 (after Marvisak/VIctory eddde73), written anew for this queue.
AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.