morningman opened a new pull request, #68221:
URL: https://github.com/apache/doris/pull/68221
### What problem does this PR solve?
Issue Number: None
Related PR: #67883, #67820, #67966, #68101
Problem Summary:
`DorisFlightSqlProducer.getFlightInfoStatement` used to rethrow a
`FlightRuntimeException` as is (#67883), so the status the session layer chose
reaches the client: `UNAVAILABLE` from the session's command lock and
`UNAUTHENTICATED` from a closed session (#67900, #67966), and whatever a
refused session is answered with. #67820 rewrote that catch block into a
catch-all that lets only its two incremental-window errors through (by
`doris-error-code` metadata) and wraps every other `FlightRuntimeException` as
`INTERNAL: get flight info statement failed, <message>` -- the wrapping #67883
had removed. The producer's other entry points (`setSessionOptions`,
`streamMetadata`) still let the status through and say they do it "as in
getFlightInfoStatement".
This PR restores the passthrough ahead of the catch-all. The window errors
are `FlightRuntimeException`s built by `queryFailure`, so #67820's metadata
special case is subsumed and removed; a non-Flight failure is still wrapped as
`INTERNAL` with the same message.
Found through #68101: its `test_connection_quota` asserts the
`RESOURCE_EXHAUSTED` the connection pool answers a refused Flight session with,
and since the pipelines compile a PR merged into master, every run after #67820
landed got the wrapped `INTERNAL` instead.
### Release note
None
### Check List (For Author)
- Test
- [x] Unit test: `DorisFlightSqlProducerTest` -- the wrapping tests of
#67820 now assert the passthrough
(`testGetFlightInfoPassesOtherFlightErrorsThrough`,
`testGetFlightInfoPassesOtherBusinessErrorsThrough`);
`testGetFlightInfoPreservesBothWindowErrors` and
`testGetFlightInfoWrapsNonFlightErrors` unchanged in intent.
- [ ] Regression test: `arrow_flight_sql_p0/test_connection_quota` of
#68101 is the end-to-end check, once that PR is rebased onto this.
- Behavior changed: Yes. Over Arrow Flight SQL, a GetFlightInfo that fails
with a Flight status chosen by the session layer (UNAVAILABLE, UNAUTHENTICATED,
...) reports that status again instead of INTERNAL, as it did between #67883
and #67820.
- Does this need documentation: No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]