docs(architecture): record the bounded report readers - #686
Merged
Merged
Conversation
The architecture still described report reads as an unbounded open. Readers now take one of eight permits, attach companion databases per query, and classify CANTOPEN as retryable exhaustion. Unix startup raises the soft open-file limit before the install's own stores open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
docs/ARCHITECTURE.mdstill described report reads as an unbounded connection that always attached the companion databases. Since that section was last touched, readers take a process-wide permit (eight slots, wait up to three seconds),AttachSetdecides which databases a query attaches, andSQLITE_CANTOPENis classified as retryableFailKind::Exhaustedrather than a settled empty or corrupt result. On Unix, startup raises the softRLIMIT_NOFILEto the hard limit (capped at DarwinOPEN_MAXon macOS) after the logger and before the install's own stores open.The new "Report readers" subsection states that contract, including the cases that are outside it: a superseded wait is
FailKind::Other, the uid-floor probe and the integrity scan do not take a slot, a missing or unhealthy companion attaches nothing, and a--fixturerun can open the relocated replica before the limit is raised.How to verify
Checked against
db::open_reader_with,db::reader_budget,read_fail::classify,AttachSet,CHART_TRADE_HISTORY_ATTACH,valuation::attach,analytics::attach_strategies, the integrity scan's bare read-only open, andstartup::open_file_limit. A separate read of the first draft rejected several absolute claims (a ninth reader always fails, CANTOPEN means the descriptor budget, valuation silence, nine descriptors unconditionally, every database open happens after the raise); the text now matches those call sites. Markdown only — no Rust, socargo fmtandcargo testare not required.Left for a later pass: the data-path section still names
chartdx::trade_history_sync::trade_mark(the function istrade_mark_with), anddocs/PRODUCT_MAP.mdstill says Ctrl+Shift+wheel super-stretch is absent.