Skip to content

YdbValidator incorrectly handles YDB status code PRECONDITION_FAILED #223

@sergiorussia

Description

@sergiorussia

here PRECONDITION_FAILED is mapped to YdbComponentUnavailableException. YdbComponentUnavailableException is in turn a RetryableException which is then handled by StdTxManager by retrying it as all such errors.

this leads to unneeded retries for errors like this:

Caused by: tech.ydb.yoj.repository.ydb.exception.YdbComponentUnavailableException: SELECT ...
Fail{Status{code = PRECONDITION_FAILED(code=400120), issues = [#2013 Query result size limit exceeded. (60480691 > 50331648) (S_ERROR)]}}

YDB docs labels PRECONDITION_FAILED as not retryable https://ydb.tech/docs/en/reference/ydb-sdk/ydb-status-codes?version=v25.2#precondition-failed.

suggestion: map PRECONDITION_FAILED to YdbRepositoryException

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions