Skip to content

content-node: let go of unread answers; discover loads only an event - #573

Merged
adamjohnwright merged 3 commits into
mainfrom
fix/content-node-resources
Oct 20, 2026
Merged

adamjohnwright merged 3 commits into
mainfrom
fix/content-node-resources

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 006 (specs/006-content-service-to-node). From the review of everything merged since #485.

Unread answers let go. An answer whose body is never read holds its connection until it is collected. Solr's refusals, which anyone can trigger with a query Solr cannot parse, and every report-service answer were never read. Each is now cancelled at once. A cancel that fails, on a body already broken, is ignored: it neither replaces the Solr error nor changes the report's log line, which names the status first.

/data/discover/{id} loads only an event. It used to collect every relationship of the object, both ways, before checking it was an event. For a species or a database that means a heavy query on the shared graph, only to answer a 422. It now asks first for the object's class and whether it has any relationship, answers the 404 or 422 from that as before, and loads only an event. On beta a species id now answers its 422 in about 13 ms.

Smaller items:

  • /search/icon/{identifier}: a spec now holds the answer Java's failure gives when Solr counts a match but sends no document. The first commit's change there is undone, because the line already threw (the review found it).
  • warm.ts: when the edge reports the wrong release, the message says a purge may be what is needed, not only a restart.

Checks

  • Each new spec was shown failing without its fix.
  • Tools unit tests: 1,132 passed. Lint, loose, implicit-any and dead code unchanged.
  • On beta, the content service rebuilt from this branch:
    • discover for an event (by stId and by dbId), a non-event (422) and two unknown ids, plus an icon and an unknown icon, were all identical before and after;
    • a species id answers its 422 at once.

🤖 Generated with Claude Code

adamjohnwright and others added 3 commits October 20, 2026 18:57
From the review of everything merged since #485 (spec 006).

- An answer whose body is never read holds its connection until it is
  collected. Solr's refusals (a query it cannot parse; anyone can send
  one) and every report-service answer were never read; each is now let
  go at once.
- /data/discover/{id} asked for every relationship of the object, both
  ways, before checking it was an event: for a species or a database,
  hundreds of thousands, only to answer a 422. It now asks the object's
  class and whether it has any relationship first, answers the 404 or the
  422 from that as before, and loads only an event.
- /search/icon/{identifier}: a count with no document (which Solr does not
  send at its default rows) answered nothing at all, the response never
  ended; it is now the Solr failure its comment promised.
- warm.ts, finding the edge reporting the wrong release, says a purge may
  be what is needed, not only a restart.

Each new spec shown failing without its fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…quiet

- /search/icon/{identifier}: the change is undone. searchResult leaves
  `entries` out when there are no documents, so the line already threw
  and fromSolr answered Solr's failure; the commit before said otherwise.
  Its spec stays, to hold that answer, and the comment says why it holds.
- A body cancel that fails (a body already broken) is ignored: it could
  replace the Solr error, and turned the report service's "answered 500"
  log line into "unavailable". The report's status is logged first; a
  spec shows it (failing on the commit before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 6515f54 into main Oct 20, 2026
12 of 13 checks passed
@adamjohnwright
adamjohnwright deleted the fix/content-node-resources branch October 20, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant