Repository navigation
Port POST /data/query/ids and /ids/map to content-node - #509
Merged
Merged
Conversation
Reactome's batch lookup: up to twenty objects by id in a text/plain body.
- Ids read as Java reads them: split on , ; newline and tab, trimmed;
past twenty, the first twenty in a HashSet (orthologyIds).
- Each id is findById(id, OUTGOING), the lookup /query/{id} does, now one
function both use (findObject), asked one at a time.
- /ids writes graph-core's HashSet of DatabaseObjects in its order, by
DatabaseObject.hashCode (dbId, stId, displayName, 31 apart; Long.hashCode
past an int); /ids/map writes a HashMap of the ids as sent. Both orders
checked against the JDK's own (11). Each object is its own lookup, so one
reached by two ids is written in full twice, as Jackson's per-instance
identity does.
- Java's errors: 415 for a body that is not text/plain, 422 naming the
method for a missing one, a 404 naming the ids as a Java list, a 500 for
a dbId past a long; a GET of /ids/map answers as Java's attribute route
does (no object called "ids").
- Routed in nginx and the dev proxy, matrix parameter and trailing slash
included; the ids exclusion #498 added comes out.
Byte-identical to Java live over ten requests -- mixed id kinds and
separators, duplicates, missing ids, over twenty ids -- bar the nested
views' known key order, declared as /query/{id} declares it. Spec 006 T071.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
graph-core's trimId splits an id on '.' and takes the first part; "." (or
"..") splits to nothing, and Java answers the whole batch with a 500
("Index 0 out of bounds for length 0"). Node skipped the id and answered
200 with the rest -- a fail-open. Java looks ids up one at a time, so the
first bad id decides between that and a dbId past a long: both are now
one in-order pass (findByIdFailure). Byte-identical to Java live on both
endpoints, each order of the two, and "..x" (which Java reads as an
empty id, not a failure). Spec 006 T071 ticked.
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 T071: Reactome's batch lookup, up to twenty objects by id from a
text/plainbody. The site doesn't call it; integrators and client libraries do.,;, newline and tab, and each id trimmed. Past twenty ids, the first twenty go into aHashSet, as Java does.findById(id, OUTGOING)that/query/{id}uses, now one shared function,findObject. Ids are looked up one at a time./idsorder: written in graph-core'sHashSet<DatabaseObject>order, byDatabaseObject.hashCode./ids/maporder: written in theHashMaporder of the ids as sent./ids/mapanswers as Java's attribute route does./data/query/idsand/ids/mapto node, matrix parameter and trailing slash included. Theidsexclusion added in Every content-node route takes a trailing slash, as Spring does #498 is removed.Measured: byte-identical to Java live over ten requests: mixed id kinds and separators, duplicates, missing ids, over twenty ids. The one difference is the nested views' known key order, declared as
/query/{id}declares it.nginx -tpasses for every deployment.🤖 Generated with Claude Code