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 truncated batch upload is answered 409 Conflict instead of 408, and reports 0 vertices instead of what it loaded #6176
com.arcadedb.server.Issue5470BatchStreamStallIT.aBodyShorterThanItsContentLengthIsNotReportedAsSuccess is failing on main, not on any one PR. Filed from the CI triage of PR #6170.
The failure
[a truncated upload must never be answered with 200]
Expecting actual: "HTTP/1.1 409 Conflict"
to contain: "408"
at Issue5470BatchStreamStallIT.java:226
Same assertion, same line, on main runs 31776078945 and 31776042204, and on every PR branch since.
Why it is worth more than a test fix
The test announces Content-Length: 1000000, sends 100 well-formed NDJSON vertices, then cleanly closes the socket. The contract #5470 established is that the server answers 408 with the counts needed to resume (verticesCreated, partialCommit: true), so a client can pick up where the stream died.
Two things go wrong now, and the second is the interesting one:
the status is 409 Conflict, which is what a ConcurrentModificationException maps to - so the interrupted-stream path is being classified as a write conflict rather than a read timeout;
the server log for the failing run says the batch was interrupted after 0 vertices and 0 edges, although the client did send 100 and vertexBatchSize=1 commits every record:
WARNI [PostBatchHandler] Batch load on database 'graph' was interrupted after 0 vertices and 0 edges
because the request body could not be read to the end: UT000199: Read timed out after 10000 milliseconds.
So the resume counts a client would rely on are not merely mis-labelled, they are zero. If the records really were not loaded, the partial-commit contract is not being honoured; if they were loaded and the counters were lost, the client is told to re-send data it already committed. Worth establishing which before deciding the fix - the test asserts both verticesCreated == 100 and that exactly 100 rows are queryable afterwards, so it can tell them apart.
Where to look
PostBatchHandler (the interrupted-read path and how it maps the failure to a status code) and whatever turns the read timeout into the exception the handler sees - a NeedRetryException/CME reaching the HTTP layer would explain the 409 exactly.
Activity
fix(ArcadeData#6180, ArcadeData#6176): a truncated batch upload is ne…