Repository navigation
fix(xerj-autoindex): a retrying request announces itself (#1183 item 1) - #1199
Merged
Merged
Conversation
The rc.83 "finalize-catalog deadlock" was not a deadlock. Diagnosis, from the incident's own evidence re-read against the client code: - The client's retry envelope was always bounded: every request carries a 300 s total timeout (esclient.rs:856, present since the #977 port), and retry_loop gives a request six attempts before handing the error back — ~31 min worst case, then the caller's own downgrade path takes over (for the alias sweep that is the #345 non-fatal warning, by design). - "All 297 threads futex_do_wait, two in ep_poll, zero CPU" is exactly the signature of reqwest::blocking: the caller parks on a oneshot (futex) while the client's internal tokio runtime polls (ep_poll). wchan cannot distinguish parked-awaiting-HTTP from parked-on-a-condvar at that granularity, so a bounded silent wait read as a lock cycle. - since_progress_s=430 > 300 confirms the loop was cycling: attempt 1 timed out at 300 s, the backoff ran, attempt 2 was in flight when the diagnostics were captured. - The server-side half stays open: the reference node runs at/over its parent memory breaker during xerj-search rebuilds (measured 2026-10-06: rss 22.5 GB against a 16 GB limit, writes 429'd for 600 s+), and one read stalling past the 300 s window under that pressure is consistent with everything captured. Tracked with the #1122 memory-ceiling class. The defect that made it LOOK like a deadlock was silence: the retry loop announced 429s (throttle_notice) but nothing at all for transport errors or 5xx. This adds failure_notice on the Attempt::Failed arm — first failure prints immediately ("autoindex: search failed: <reason>; retrying (attempt 2 of 6, 310 s in this request so far)"), then at most once per NOTICE_EVERY, sharing throttle_notice's clock so alternating 429/timeout cannot double-announce. Same announce gate: loading runs speak; probes, MCP clients and --quiet stay silent — zero output-shape change for any non-loading caller. The incident's 1479-item finalize-catalog total (implying ~1.5 M sweep paths) is not reconcilable with the corpus's actual duplicate set (58 008 files, ≤ ~3.6 k duplicates -> ≤ 4 chunks) and the journal that produced it is gone; the standing --fresh rebuild (b1791330708, fresh journal, empty plan) will pin the real number when it reaches finalize. Noted in the tracker comment rather than guessed at here. Tests: failure_notices_announce_immediately_then_hold_the_cadence pins the gate (quiet never announces nor marks the clock; a loading run announces the first failure and holds the cadence on the next); a_dropped_connection_is_retried_after_announcing pins the wire shape (read-then-drop -> transport failure -> retry -> 200). Crate suite 1267 passed / 0 failed, clippy clean, fmt applied. Reference-coding: skipped — the change is confined to this repository's own client (a stderr notice inside our own retry loop); the transport precedent for the retry policy itself is already cited in-file (quickwit/meilisearch, esclient.rs BulkAdmission header).
…lope # Conflicts: # CHANGELOG.md
This was referenced Oct 7, 2026
Merged
neoneye
pushed a commit
to agent-memory-atlas-archive/xerj-org--xerj
that referenced
this pull request
Oct 10, 2026
The corpus-index trust window. Four PRs, all against the corpus ingest path the rc.84-86 honesty work exposed: - xerj-org#1195 (merged just past the rc.86 tag): phase-B bulk bodies coalesce across files — the per-file round-trip ceiling of xerj-org#1147 (xerj-org#10^5 records/node-day on the ghsa-scale mirror class). A/B'd, no regression: rustsec 10.1s -> 9.7s, pysec 17.4s -> 16.9s, phase B at parity on both shapes; the structural win shows at scale, which the standing corpus rebuild re-measures. - xerj-org#1197: `xerj corpus index` proves the store answers a search before printing "searchable" — the xerj-org#1183 resume that certified 642 records over a store answering every _search with store_exception. An unsearchable build is retired by exact name, not switched in. - xerj-org#1199: a retrying client request announces itself (xerj-org#1183 item 1's client half) — the retry envelope was bounded (6 x 300s) but silent, which is exactly how it read as a deadlock. The server-side stall under memory pressure stays open in xerj-org#1183 with the xerj-org#1122 class. - xerj-org#1200: JSON records with no prose gain a synthesized text passage, plus a plan-time warning for any dataset mapping no text-searchable field — the build-time half of xerj-org#1158, whose query-time half shipped in rc.86. The issue closes with both halves shipped. ROADMAP rolled to the rc.87 cut: nine open at the cut (xerj-org#1147 and xerj-org#1158 closed inside the window), the rc.86 and earlier records stand as written. Release-notes gate: PASS locally. Files: engine/Cargo.toml (version stamp), CHANGELOG.md ([Unreleased] cut into [1.0.0-rc.87]; the xerj-org#1147 entry written at this roll — the PR merged past the tag, so its entry lands here), ROADMAP.md.
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
The retry loop in the autoindex ES client announced HTTP 429 waits (
throttle_notice) but said nothing for transport errors and 5xx. This adds the symmetricfailure_notice: a loading run (announce on) now printson the first failure and at most once per
NOTICE_EVERY(30 s) after, sharing the 429 notice's clock so an alternating 429/timeout sequence cannot double-announce. Probes, MCP clients and--quietstay silent — no output-shape change for any non-loading caller.Why: the #1183 "deadlock" was not a deadlock
The incident report ("finalize-catalog deadlocks — all 297 threads futex-waiting", rc.83 fresh build) re-examined against the client code:
esclient.rs, present since the [feature]: xc.py is not useful with xerj having the same capabilties inside the binary. Update LLMS and skills to have it nice #977 port), andretry_loopgives a request six attempts before handing the error back — ≈31 min worst case. The alias sweep's failure path is the autoindex aborts on a byte-identical duplicate file (split out of #326) #345 non-fatal warning by design, so even exhaustion downgrades loudly instead of hanging.reqwest::blockingparks the caller on a oneshot (wchanfutex_do_wait) while its internal tokio runtime polls (ep_poll) — which is precisely "all 297 threads futex-waiting except two tokio workers in ep_poll, zero CPU". wchan cannot distinguish parked-awaiting-HTTP from parked-on-a-condvar.since_progress_s=430 > 300: attempt 1 timed out at 300 s, the backoff ran, attempt 2 was in flight when diagnostics were captured.The defect that made a bounded wait look like a deadlock was the silence. This PR fixes the silence. The issue's own minimum ask — "the phase should time out and report rather than hang" — was already satisfied on the timeout half; this lands the report half.
One honest unknown, not guessed at
The incident's
items=34/1479finalize-catalog total implies ~1.5 M sweep paths, which is not reconcilable with the corpus's actual duplicate set (58 008 files across the six repos, ≤ ~3.6 k duplicates ⇒ ≤ 4 chunks), and the journal that produced it is gone. The standing--freshrebuild (fresh journal, empty plan) will pin the real number when it reaches finalize; the tracker comment records the discrepancy rather than papering over it.Tests
failure_notices_announce_immediately_then_hold_the_cadence— the gate: a quiet client never announces nor marks the clock; a loading run announces the first failure and holds the cadence on the immediate next.a_dropped_connection_is_retried_after_announcing— the wire shape: read-then-drop ⇒ transport failure ⇒ announce + retry ⇒ 200.Notes
BulkAdmissionheader).