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

[fix](arrow-flight-sql) Fix FE not found arrow flight schema #43960

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

xinyiZzz
Copy link
Contributor

@xinyiZzz xinyiZzz commented Nov 14, 2024

What problem does this PR solve?

Problem Summary:

After query first phase exec_plan_fragment, FE will fetches arrow schema to BE, but BE will generate arrow schema when query second stage ResultSinkLocalState::open.

Therefore, this pr is changed to generate arrow schema in the first phase ResultSinkLocalState::init.

Fix:

rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@xinyiZzz
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.94% (9888/26060)
Line Coverage: 29.13% (82618/283580)
Region Coverage: 28.27% (42475/150240)
Branch Coverage: 24.85% (21541/86684)
Coverage Report: http://coverage.selectdb-in.cc/coverage/57834a4dab71129dac599055ef876e41b68bf5f6_57834a4dab71129dac599055ef876e41b68bf5f6/report/index.html

@yiguolei yiguolei added the usercase Important user case type label label Nov 16, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Nov 17, 2024
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@wangbo wangbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xinyiZzz xinyiZzz merged commit f7bc15f into apache:master Nov 18, 2024
32 of 35 checks passed
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Nov 18, 2024
…43960)

### What problem does this PR solve?

Problem Summary:

After query first phase `exec_plan_fragment`, FE will fetches arrow
schema to BE, but BE will generate arrow schema when query second stage
`ResultSinkLocalState::open`.

Therefore, this pr is changed to generate arrow schema in the first
phase `ResultSinkLocalState::init`.

Fix:

```
rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
```
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Nov 19, 2024
…43960)

Problem Summary:

After query first phase `exec_plan_fragment`, FE will fetches arrow
schema to BE, but BE will generate arrow schema when query second stage
`ResultSinkLocalState::open`.

Therefore, this pr is changed to generate arrow schema in the first
phase `ResultSinkLocalState::init`.

Fix:

```
rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
```
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Nov 19, 2024
…43960)

### What problem does this PR solve?

Problem Summary:

After query first phase `exec_plan_fragment`, FE will fetches arrow
schema to BE, but BE will generate arrow schema when query second stage
`ResultSinkLocalState::open`.

Therefore, this pr is changed to generate arrow schema in the first
phase `ResultSinkLocalState::init`.

Fix:

```
rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
```
yiguolei pushed a commit that referenced this pull request Nov 19, 2024
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Nov 20, 2024
…43960)

Problem Summary:

After query first phase `exec_plan_fragment`, FE will fetches arrow
schema to BE, but BE will generate arrow schema when query second stage
`ResultSinkLocalState::open`.

Therefore, this pr is changed to generate arrow schema in the first
phase `ResultSinkLocalState::init`.

Fix:

```
rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
```
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Nov 20, 2024
…43960)

Problem Summary:

After query first phase `exec_plan_fragment`, FE will fetches arrow
schema to BE, but BE will generate arrow schema when query second stage
`ResultSinkLocalState::open`.

Therefore, this pr is changed to generate arrow schema in the first
phase `ResultSinkLocalState::init`.

Fix:

```
rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
```
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Nov 20, 2024
…43960)

Problem Summary:

After query first phase `exec_plan_fragment`, FE will fetches arrow
schema to BE, but BE will generate arrow schema when query second stage
`ResultSinkLocalState::open`.

Therefore, this pr is changed to generate arrow schema in the first
phase `ResultSinkLocalState::init`.

Fix:

```
rrmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled], error code: null, error msg:
java.lang.RuntimeException: fetch arrow flight schema failed, finstId: 3573efbeb10c44a7-956531d8e15d1630, errmsg: Status [errorCode=NOT_FOUND, errorMsg=(172.16.212.191)[NOT_FOUND]FE not found arrow flight schema, maybe query has been canceled]
        at org.apache.doris.service.arrowflight.FlightSqlConnectProcessor.fetchArrowFlightSchema(FlightSqlConnectProcessor.java:126) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.executeQueryStatement(DorisFlightSqlProducer.java:229) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.service.arrowflight.DorisFlightSqlProducer.getFlightInfoStatement(DorisFlightSqlProducer.java:260) ~[doris-fe.jar:1.2-SNAPSHOT]
```
yiguolei pushed a commit that referenced this pull request Nov 26, 2024
[pick](branch-3.0) #38215 #43281 #43960

---------

Co-authored-by: Guangdong Liu <liugddx@gmail.com>
deardeng pushed a commit to deardeng/incubator-doris that referenced this pull request Jan 6, 2025
* [pick](branch-2.1) pick apache#38215 (apache#43386)

pick apache#38215

---------

Co-authored-by: Zou Xinyi <zouxinyi@selectdb.com>

* pick apache#43929

* pick apache#43960
@yiguolei yiguolei mentioned this pull request Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.1.8-merged dev/3.0.3-merged reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants