Skip to content

RemoteStreamingResultSet: rebuild the typed exception from the in-band error line's status/exception/exceptionArgs #8874

Closed

Description

@robfrank

Follow-up from #8235.

#8235 makes the in-band error line of a streamed query (Accept: application/x-ndjson on GET/POST /api/v1/query and POST /api/v1/command) carry status, exception and exceptionArgs, decided by the same classifyError the buffered encoding answers with.

The Java driver does not read them yet: RemoteStreamingResultSet.hasNext (network module) reads only error.message and throws a plain RemoteException, while the buffered path (RemoteHttpComponent.manageException) rebuilds ConcurrentModificationException, DuplicatedKeyException, RecordNotFoundException, etc. So a caller using the streamed encoding still cannot catch a retryable conflict as a NeedRetryException.

What to do

Rebuild the typed exception from exception/exceptionArgs (reusing the manageException mapping) when the streamed error line carries them, falling back to RemoteException for a server that predates #8235.

Why not in #8235

#8235 is the server wire contract; the driver change is a separate module and a separate behaviour change for existing callers.

Activity

  1. added
    enhancementNew feature or request
    serverCore server: HTTP API, users, security enforcement
    severity:minorCosmetic, documentation, edge case, or a workaround exists
    on Oct 1, 2026
  2. modified the milestones: 26.10.1, 26.11.1 on Oct 2, 2026
  3. self-assigned this
    on Oct 7, 2026
  4. robfrank commented on Oct 7, 2026

    @robfrank
    CollaboratorAuthor

    Related: PR #9475 (#8899) adds a retryAfter member (integer seconds) to the in-band error line of both NDJSON streams for a retryable refusal (503 RetryLater, 409 in-flight), and in production mode the query line's message is now the classified label rather than the raw text. A driver-side rebuild of the typed exception here can key on status/exception/exceptionArgs and use retryAfter for the back-off.

  5. added a commit that references this issue on Oct 8, 2026
  6. robfrank commented on Oct 8, 2026

    @robfrank
    CollaboratorAuthor

    Fixed by #9472. queryStream() and commandStream() on RemoteDatabase now throw the same typed exception the buffered path throws when the server reports a failure mid-stream: ConcurrentModificationException (retryable), DuplicatedKeyException, RecordNotFoundException, SecurityException, or NeedRetryException for a 503 with no detail. A server older than #8235, an exception type the client does not know, or malformed exception arguments still fall back to the generic RemoteException.

    Still open: the buffered (non-streaming) error path has the same weakness with malformed exception arguments, tracked in #9473.


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  7. removed
    in progressThe team is actively working on this issue
    on Oct 8, 2026
  8. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestnetworkBinary network protocol and remote clientserverCore server: HTTP API, users, security enforcementseverity:minorCosmetic, documentation, edge case, or a workaround exists

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions