Repository navigation
Conversation
When a Comunica endpoint's own per-query timeout fires, it has already sent HTTP 200 and the start of the result, so it ends the response with "!TIMEDOUT!" and kills its worker. The validator trusted the 200: in the vcf-bench-3 scale run (HG005, 1M records, HDT) q05 ran for 3600.06s and was recorded as PASS. The replacement worker was not yet listening, so q06-q13 were then refused within a millisecond each. - A response ending in the marker is a timeout: exit 124, EXECUTION_FAILED. The truncated body is kept as evidence. - No engine passes on exit 0 alone: the result must be SPARQL Results JSON (a bindings list or an ASK boolean). This covers QLever too. - After a timeout (server- or client-side), the endpoint is restarted before the next query, so one timeout costs one query. The restart is reported as endpointRestartSeconds and kept out of wallSeconds. It is lazy, so --stop-after-query-timeout pays nothing for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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.
Problem
When a Comunica endpoint's own per-query timeout fires, it has already sent HTTP 200 and the start of the result. It then ends the response with
!TIMEDOUT!and kills its worker (HttpServiceSparqlEndpoint.runWorker,connection.end('!TIMEDOUT!')). The validator trusted the 200 and recorded a pass.This is visible in the v3.3.1 provenance rerun on vcf-bench-3 (
16_scale_retrieval/r1000000__hdt__hdt__core__r1):PASS, exit 0, 3600.06 s"bindings": [followed by!TIMEDOUT!EXECUTION_FAILEDin < 1 ms eachConnection refused: the replacement worker had not bound yetThe run as a whole was not reported as passing, because q05's body failed to parse at the comparison step. But the per-query record (
benchmark.json,benchmark.csv,query-executions.json) says q05 passed, and one timeout cost eight more queries.Fix
!TIMEDOUT!is recorded with exit 124 andEXECUTION_FAILED, the same as a client-side timeout.--stop-after-query-timeouttherefore applies to it too. The truncated body is kept as evidence._enveloperequires a well-formed SPARQL Results JSON result: aresults.bindingslist or an ASKboolean. This also covers QLever and anything else that returns a 200 with a broken body.endpointRestartSecondson the next query and kept out of itswallSeconds. It happens only when another query is about to run, so--stop-after-query-timeoutnever pays for it. If the restart fails, that query recordsendpointRestartErrorand the remaining queries fail immediately; there is no repeated retry.Tests
test/test_query_timeout_marker_unit.py(12 tests) replays the recorded q05 body byte for byte against a fake Comunica that behaves like the real one: its worker dies on a timeout and refuses connections until it is restarted. The tests include a fullrun_validationrun with q04–q06 in which q05 times out.main: 18 failures and errors. The end-to-end test reproduces the incident, recording q05 asPASS.pycottas==1.1.0, pyoxigraph 0.3.18), and every changed line invalidation_runner.pyis covered.docs/validation.mddocuments the behaviour.🤖 Generated with Claude Code