Repository navigation
xrefs: identifier and filter as query parameters; a batch's work bounded - #571
Merged
Merged
Conversation
/references/mapping/{identifier}/xrefs and POST /references/mapping/xrefs
wrote the identifier and dbFilter into the Cypher text between double
quotes, as ReferenceEntityController does. Both are now parameters. For
every identifier and filter without a quote the query and its answer are
Java's; one with a quote is looked up as written and matches nothing,
where Java answers 500 or runs the query the text has become.
The batch endpoint's work is bounded:
- it is a deep query (its own share of the pool): each identifier is a
scan of every node, and a 10MB body holds millions;
- a lookup that throws abandons the rest, as one that answers an error
already did -- before, the other workers ran on after the answer;
- no lookup starts once the client has gone.
A query the database ends (its time limit) is the service's 503 here too,
not Java's 500 with Neo4j's message.
Each new spec shown failing without its fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /references/mapping/xrefs is no longer a deep route: it shared the four deep places with in-depth and locationsInPWB, which the Pathway Browser reads, so a script paging through batches could have turned those into 503s. Batches have a share of their own, two at a time, taken after the request's own checks (so a malformed one is still Java's 415/400/413/422). - The claim says what is exactly true: an identifier or filter with neither a quote nor a backslash gets Java's query and answer (a backslash begins an escape in Java's text). - The quote spec uses a bare quote; it proves the same thing. - The client-gone spec waits for the first lookup and asserts there was one, so it cannot pass by testing nothing. Each new spec shown failing without its fix. Beta: the xrefs captures identical again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Spec 006 (
specs/006-content-service-to-node). From the review of everything merged since #485.Query parameters.
/references/mapping/{identifier}/xrefsandPOST /references/mapping/xrefswrote the identifier anddbFilterinto the Cypher text, as ReferenceEntityController does. Both are now query parameters. For any identifier or filter without a double quote, the query and its answer are Java's. One with a quote is looked up as written and matches nothing (404, or NO MATCH in a batch). Java answers those with a 500, or with whatever the text has become. This is a deliberate difference from Java, limited to those inputs.The batch endpoint's work is bounded:
Timeouts. A query the database ends at its time limit is the service's 503 here, as everywhere else, not Java's 500 with Neo4j's message.
Checks
ENSEMBL,ZINC - World Drugs, a filter matching nothing, an unknown identifier,/references/mapping/P36897, and a batch POST were all identical before and after, timestamps masked. A quoted identifier is now a 404.🤖 Generated with Claude Code