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-40345: [FlightRPC][C++][Java][Go] Add URI scheme to reuse connection #40084

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented Feb 14, 2024

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

Copy link

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:

Copy link
Contributor

@alamb alamb left a comment

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://

docs/source/format/Flight.rst Outdated Show resolved Hide resolved
parsed by both implementations, as well as Go's ``net/url`` and
Python's ``urllib.parse``.)

This allows the server to return "itself" as one possible location to
Copy link
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;

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Feb 16, 2024
@lidavidm
Copy link
Member Author

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

@alamb
Copy link
Contributor

alamb commented Feb 16, 2024

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

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Feb 20, 2024
@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
Copy link

github-actions bot commented Mar 4, 2024

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

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@lidavidm lidavidm marked this pull request as ready for review March 4, 2024 14:56
@lidavidm
Copy link
Member Author

lidavidm commented Mar 4, 2024

Any final comments?

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

cpp/src/arrow/flight/integration_tests/test_integration.cc Outdated Show resolved Hide resolved
cpp/src/arrow/flight/types.h Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Mar 5, 2024
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@lidavidm lidavidm merged commit ef6ea6b into apache:main Mar 5, 2024
58 of 60 checks passed
@lidavidm lidavidm removed the awaiting merge Awaiting merge label Mar 5, 2024
@lidavidm lidavidm deleted the proposal-fallback branch March 5, 2024 14:53
Copy link

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.

mapleFU pushed a commit to mapleFU/arrow that referenced this pull request Mar 7, 2024
…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>
thisisnic pushed a commit to thisisnic/arrow that referenced this pull request Mar 8, 2024
…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