Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-35888: [Java] Add FlightStatusCode.RESOURCE_EXHAUSTED #41508

Merged
merged 1 commit into from
May 3, 2024

Conversation

janosik47
Copy link
Contributor

@janosik47 janosik47 commented May 2, 2024

Rationale for this change

Related to #35888

Currently the gRPC Status.RESOURCE_EXHAUSTED exception/code is translated by the Java FlightServer into FlightStatusCode.INVALID_ARGUMENT and thrown to the client as gRPC INVALID_ARGUMENT exception.

That may mislead the other party as the INVALID_ARGUMENT indicates an input parameters problem where in reality the backed server intention was rather 'back off and try later'.

What changes are included in this PR?

Add the FlightStatusCode.RESOURCE_EXHAUSTED code and make sure is translated from/to the gRPC Status.RESOURCE_EXHAUSTED

Are these changes tested?

Unit tests included to validate the RESOURCE_EXHAUSTED translation between flight and grpc codes.

Are there any user-facing changes?

No.

Users may start seeing RESOURCE_EXHAUSTED instead of INVALID_ARGUMENT code. In both cases this is an exception seen on the client side so I am considering this as a not breaking change to any public API.

Although, may have an influence in the client side flows if one decided to react conditionally on exception status code.

Support for apache#35888

Add the FlightStatusCode.RESOURCE_EXHAUSTED code and make sure is translated from/to the gRPC Status.RESOURCE_EXHAUSTED
@janosik47 janosik47 requested a review from lidavidm as a code owner May 2, 2024 20:11
Copy link

github-actions bot commented May 2, 2024

⚠️ GitHub issue #35888 has been automatically assigned in GitHub to PR creator.

@lidavidm
Copy link
Member

lidavidm commented May 2, 2024

CC @pitrou @zeroshade more reason I'd like to stop making Flight such a heavy wrapper around gRPC

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels May 2, 2024
@lidavidm lidavidm merged commit 0d8b379 into apache:main May 3, 2024
15 of 16 checks passed
@lidavidm lidavidm removed the awaiting merge Awaiting merge label May 3, 2024
Copy link

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 0d8b379.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.

vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
…e#41508)

### Rationale for this change

Related to apache#35888

Currently the gRPC Status.RESOURCE_EXHAUSTED exception/code is translated by the Java FlightServer into FlightStatusCode.INVALID_ARGUMENT and thrown to the client as gRPC INVALID_ARGUMENT exception.

That may mislead the other party as the INVALID_ARGUMENT indicates an input parameters problem where in reality the backed server intention was rather 'back off and try later'.

### What changes are included in this PR?

Add the FlightStatusCode.RESOURCE_EXHAUSTED code and make sure is translated from/to the gRPC Status.RESOURCE_EXHAUSTED

### Are these changes tested?

Unit tests included to validate the RESOURCE_EXHAUSTED translation  between flight and grpc codes.

### Are there any user-facing changes?

No.

Users may start seeing RESOURCE_EXHAUSTED instead of INVALID_ARGUMENT code. In both cases this is an exception seen on the client side so I am considering this as a _not breaking change to any public API_.

Although, may have an influence in the client side flows if one decided to react conditionally on exception status code.

* GitHub Issue: apache#35888

Authored-by: Jacek Stania <janosik47@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
@janosik47 janosik47 deleted the java-resource-exhausted branch June 19, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants