ydb-platform / ydb-platform/ydb-java-sdk

bug: "Sent message larger than max" error is retryable

Open
#621 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai_reviewed
Dominant language
Java
Stars
53
Forks
40
Avg merge
9h 51m
Merged PRs (30d)
7

Description

Bug Report

When sending a large payload (e.g. UPSERT with $data parameter exceeding gRPC message limit), the driver returns ResourceExhausted ("trying to send message larger than max"). The problem is that this error is currently treated as retryable. Retrying does not change the situation — the payload size is the same, so every retry fails again with the same error. From the caller's perspective the process effectively hangs (repeated retries until timeout or context cancel), instead of failing fast so the client can reduce batch size or handle the error.

A similar situation was addressed for BulkUpsert and Topic writer. For the Query service (DoTx / Exec with large params), this specific subtype of ResourceExhausted ("message larger than max") should be treated as non-retryable, so that the error is returned to the client immediately. Alternatively, the SDK could handle large messages (e.g. split or document the limit) like for BulkUpsert/Topic.

YDB Java SDK version:

Any version

Environment

Any environment

Current behavior:

Message retires according to retry configuration

Expected behavior:

  • Option A (recommended): Treat ResourceExhausted with description "message larger than max" (and similar parameter size limits) as non-retryable, so the error is returned immediately and the client can reduce batch size or react.
  • Option B: Or handle large messages in the SDK (e.g. split before send, or document the limit) like for BulkUpsert/Topic.

Steps to reproduce:

Create an upsert query with huge parameters size

Other information:

Similar issue for go SDK: https://github.com/ydb-platform/ydb-go-sdk/issues/2024

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the YDB Java SDK's Query service handling for DoTx and Exec, then reproduce the issue with an upsert query whose parameters exceed the gRPC message limit. Compare the retry behavior with the BulkUpsert and Topic writer cases mentioned in the report. Done means the relevant "message larger than max" ResourceExhausted error is returned immediately rather than retried.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.