Skip to content

A truncated batch upload is answered 409 Conflict instead of 408, and reports 0 vertices instead of what it loaded #6176

Closed

Description

@lvca

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:

  1. 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;
  2. 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

  1. added this to the 26.9.1 milestone on Aug 14, 2026
  2. added a commit that references this issue on Aug 16, 2026
  3. added
    engine
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugengine

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions