You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A JSON-LD crawl probes every blank-node value for an rdf:first, on ledgers that hold no list #2181
area:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expectedperformancePerformance improvement (release notes: Performance)
Claude caught this while re-checking #2159's follow-up commits after merge. Introduced in 3f943a4c2 (merged with #2159), and unchanged on main at 9420db4ca.
What happens
3f943a4c2 makes a JSON-LD crawl read a list stored as rdf:first/rdf:rest triples as its members, which is right. To find those lists, fluree-db-api/src/format/hydration.rs:1405 calls stored_list_members (:2606) on every crawled predicate, and that calls rdf_list::chain_members for each flake whose object is a blank node. Each call is at least one SPOT range read (walk_chain looks up the node's rdf:first) before it can answer "not a list".
Nothing gates it. has_list_meta says nothing about chains, which are plain triples, so the probe runs on a ledger that has never stored an rdf:first.
Cost
3,000 indexed subjects with two blank-node values each (ex:addr [ ex:city … ], ex:tag [ ex:k … ]), no lists (has_list_meta is Some(false)), crawled with {"select": {"?s": ["*"]}, "where": {"@id": "?s", "@type": "ex:Person"}}. Best of three, twice each, in the same debug binary: 162 ms with the chain read on, 126 ms with stored_list_members returning nothing, about 29%.
Nested objects without an @id are a common JSON-LD shape, so this reaches a lot of crawls. No bench covers it today, and it isn't in #2173 (that one is the list view's query lanes; this is hydration).
Suggested fix
Skip the probe when the graph holds no rdf:first triple at all, which an index predicate lookup plus a look at novelty can answer once per request. A blank-node-heavy crawl bench with a regression-budget.json entry would keep it from coming back.
area:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expectedperformancePerformance improvement (release notes: Performance)
Activity