Skip to content

GH-40345: [FlightRPC][C++][Java][Go] Add URI scheme to reuse connection - #40084

Merged
lidavidm merged 2 commits into
apache:mainfrom
lidavidm:proposal-fallback
Mar 5, 2024
Merged

lidavidm merged 2 commits into
apache:mainfrom
lidavidm:proposal-fallback

Conversation

@lidavidm

@lidavidm lidavidm commented Feb 14, 2024 •

Copy link
Copy Markdown
Member

Rationale for this change

https://docs.google.com/document/d/1g9M9FmsZhkewlT1mLibuceQO8ugI0-fqumVAXKFjVGg/edit?usp=sharing

What changes are included in this PR?

Base implementation sans integration test

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @lidavidm -- this is a valuable feature in my mind.

My only concern is about the terminology -- Fallback is confusing to me as it implies this scheme should only be used when other schemes fail, but I can see cases where the server intends the client to be able to fetch data from the same endpoint as a valid option (not a a fallback in an error case)

Here are some other potential names for consideration that I think may match the intent better:

arrow-flight-generator:// (matches existing terminology)
arrow-flight-default://
arrow-flight-source-location://
arrow-flight-any://

Comment thread docs/source/format/Flight.rst Resolved
Comment thread docs/source/format/Flight.rst Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I recommend we put this context and use directly into the Flight protobuf as well so that the spec can be implemented directly from the .proto spec

arrow/format/Flight.proto

Lines 436 to 452 in e83295b

/*
* A list of URIs where this ticket can be redeemed via DoGet().
*
* If the list is empty, the expectation is that the ticket can only
* be redeemed on the current service where the ticket was
* generated.
*
* If the list is not empty, the expectation is that the ticket can
* be redeemed at any of the locations, and that the data returned
* will be equivalent. In this case, the ticket may only be redeemed
* at one of the given locations, and not (necessarily) on the
* current service.
*
* In other words, an application can use multiple locations to
* represent redundant and/or load balanced services.
*/
repeated Location location = 2;

@lidavidm

Copy link
Copy Markdown
Member Author

I've already renamed it and will update the docs. Is the proposed scheme acceptable?

@alamb

alamb commented Feb 16, 2024

Copy link
Copy Markdown
Contributor

I've already renamed it and will update the docs. Is the proposed scheme acceptable?

I think arrow-flight-reuse-connection:// is acceptable in my opinion - referring to the concept as fallback in the docs is confusing but if we update that then the proposal would be great to me

@lidavidm
lidavidm force-pushed the proposal-fallback branch 2 times, most recently from 1ee1d0a to b9b4352 Compare February 20, 2024 16:32
@lidavidm lidavidm changed the title WIP: [FlightRPC][C++][Java] Add fallback URI scheme WIP: [FlightRPC][C++][Java] Add URI scheme to reuse connection Feb 20, 2024
@lidavidm lidavidm changed the title WIP: [FlightRPC][C++][Java] Add URI scheme to reuse connection DO NOT MERGE: [FlightRPC][C++][Java] Add URI scheme to reuse connection Feb 20, 2024
@lidavidm lidavidm changed the title DO NOT MERGE: [FlightRPC][C++][Java] Add URI scheme to reuse connection DO NOT MERGE: [FlightRPC][C++][Java][Go] Add URI scheme to reuse connection Feb 20, 2024
@lidavidm lidavidm changed the title DO NOT MERGE: [FlightRPC][C++][Java][Go] Add URI scheme to reuse connection GH-40345: [FlightRPC][C++][Java][Go] Add URI scheme to reuse connection Mar 4, 2024
@github-actions

github-actions Bot commented Mar 4, 2024

Copy link
Copy Markdown

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

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@lidavidm
lidavidm force-pushed the proposal-fallback branch from 16e24dc to a17feb1 Compare March 4, 2024 14:56
@lidavidm
lidavidm marked this pull request as ready for review March 4, 2024 14:56
@lidavidm

lidavidm commented Mar 4, 2024

Copy link
Copy Markdown
Member Author

Any final comments?

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Comment thread cpp/src/arrow/flight/types.h Resolved
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@lidavidm
lidavidm merged commit ef6ea6b into apache:main Mar 5, 2024
@lidavidm
lidavidm deleted the proposal-fallback branch March 5, 2024 14:53
@conbench-apache-arrow

Copy link
Copy Markdown

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

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…nnection (apache#40084)

### Rationale for this change

https://docs.google.com/document/d/1g9M9FmsZhkewlT1mLibuceQO8ugI0-fqumVAXKFjVGg/edit?usp=sharing

### What changes are included in this PR?

Base implementation sans integration test

### Are these changes tested?

Yes

### Are there any user-facing changes?
No
* GitHub Issue: apache#40345

Lead-authored-by: David Li <li.davidm96@gmail.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
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.

4 participants