Skip to content

Conversation

@rishabhmaurya
Copy link
Contributor

@rishabhmaurya rishabhmaurya commented Feb 24, 2025

Description

With recently added Arrow SPIs #16691 and flight server support #16962, this is a follow up change which introduces -

  • implementation of getStream() and getFlightInfo() APIs. It also adds support for default StreamManager, FlightProducer, FlightStreamReader which these APIs make use of.
  • adds way for consumers of StreamManagerPlugin to get instance of default StreamManager.
  • adds ProxyStreamProvider which acts as forward proxy for FlightStream. This is useful when stream is not present locally and needs to be fetched from a different node in the cluster.

Related Issues

Resolves #17065

Check List

  • Functionality includes testing.
    - [ ] API changes companion pull request created, if applicable.
    - [ ] Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Performance labels Feb 24, 2025
@rishabhmaurya rishabhmaurya self-assigned this Feb 24, 2025
@rishabhmaurya rishabhmaurya moved this to 🏗 In progress in Search Project Board Feb 24, 2025
@rishabhmaurya rishabhmaurya moved this from Todo to In Progress in Performance Roadmap Feb 24, 2025
@github-actions
Copy link
Contributor

✅ Gradle check result for 7738286: SUCCESS

@codecov
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 82.29508% with 54 lines in your changes missing coverage. Please review.

Project coverage is 72.40%. Comparing base (7b6108b) to head (02c7595).
Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
...ensearch/arrow/flight/impl/FlightStreamTicket.java 70.45% 4 Missing and 9 partials ⚠️
server/src/main/java/org/opensearch/node/Node.java 0.00% 12 Missing and 1 partial ⚠️
...ensearch/arrow/flight/impl/BaseFlightProducer.java 91.81% 8 Missing and 1 partial ⚠️
...nsearch/arrow/flight/impl/FlightStreamManager.java 91.37% 3 Missing and 2 partials ⚠️
...ch/arrow/flight/bootstrap/FlightClientManager.java 77.77% 3 Missing and 1 partial ⚠️
...light/impl/CustomCallbackBackpressureStrategy.java 70.00% 1 Missing and 2 partials ⚠️
...c/main/java/org/opensearch/common/cache/Cache.java 75.00% 3 Missing ⚠️
...va/org/opensearch/plugins/StreamManagerPlugin.java 0.00% 2 Missing ⚠️
...rch/arrow/flight/bootstrap/FlightStreamPlugin.java 0.00% 0 Missing and 1 partial ⚠️
...nsearch/arrow/flight/impl/ProxyStreamProducer.java 95.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17446      +/-   ##
============================================
- Coverage     72.44%   72.40%   -0.05%     
- Complexity    66483    66583     +100     
============================================
  Files          5409     5417       +8     
  Lines        308282   308550     +268     
  Branches      44759    44776      +17     
============================================
+ Hits         223344   223408      +64     
- Misses        66608    66857     +249     
+ Partials      18330    18285      -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rishabhmaurya
Copy link
Contributor Author

rishabhmaurya commented Apr 9, 2025

@reta I have addressed your comments. I appreciate your thorough review of these PRs, so thank you for doing it.
It would be nice if it can make to 3.0 as a lot of POC code (spread across plugins) is dependent on it and it is becoming complex to manage feature branches.
we can merge #17738 prior to it.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

❕ Gradle check result for 90cf37a: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

@reta reta left a comment

Choose a reason for hiding this comment

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

Thanks @rishabhmaurya , great work! @mch2 anything left from your side? thanks!

@github-project-automation github-project-automation bot moved this from 🏗 In progress to 👀 In review in Search Project Board Apr 10, 2025
@github-actions
Copy link
Contributor

❕ Gradle check result for 02c7595: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Member

@mch2 mch2 left a comment

Choose a reason for hiding this comment

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

lgtm, Thanks @rishabhmaurya excited to see where this goes!

@mch2 mch2 merged commit 07cb4c9 into opensearch-project:main Apr 11, 2025
36 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap Apr 11, 2025
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Search Project Board Apr 11, 2025
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Apr 15, 2025
* make use of extendedPlugins provide runtime dependencies for arrow-memrory-core

Signed-off-by: Rishabh Maurya <[email protected]>

* merged opensearch-arrow-core into arrow-flight-rpc plugin

Signed-off-by: Rishabh Maurya <[email protected]>

* moved libs:arrow-spi to server module

Signed-off-by: Rishabh Maurya <[email protected]>

* Flight producer changes

Signed-off-by: Rishabh Maurya <[email protected]>

* add hook in StreamManager plugin to get its instance on initialization

Signed-off-by: Rishabh Maurya <[email protected]>

* Minor refactor

Signed-off-by: Rishabh Maurya <[email protected]>

* Add more unit tests and address PR comment

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* defer setting BufferAllocator in FlightStreamManager

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* Refactor BaseFlightProducer and improved error handling

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* refactor and improve test coverage

Signed-off-by: Rishabh Maurya <[email protected]>

* throw UnsupportedOperationException for ProxyStreamProducer#getAction()

Signed-off-by: Rishabh Maurya <[email protected]>

* refactor error handling

Signed-off-by: Rishabh Maurya <[email protected]>

---------

Signed-off-by: Rishabh Maurya <[email protected]>
Signed-off-by: Sriram Ganesh <[email protected]>
Harsh-87 pushed a commit to Harsh-87/OpenSearch that referenced this pull request May 7, 2025
* make use of extendedPlugins provide runtime dependencies for arrow-memrory-core

Signed-off-by: Rishabh Maurya <[email protected]>

* merged opensearch-arrow-core into arrow-flight-rpc plugin

Signed-off-by: Rishabh Maurya <[email protected]>

* moved libs:arrow-spi to server module

Signed-off-by: Rishabh Maurya <[email protected]>

* Flight producer changes

Signed-off-by: Rishabh Maurya <[email protected]>

* add hook in StreamManager plugin to get its instance on initialization

Signed-off-by: Rishabh Maurya <[email protected]>

* Minor refactor

Signed-off-by: Rishabh Maurya <[email protected]>

* Add more unit tests and address PR comment

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* defer setting BufferAllocator in FlightStreamManager

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* Refactor BaseFlightProducer and improved error handling

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* refactor and improve test coverage

Signed-off-by: Rishabh Maurya <[email protected]>

* throw UnsupportedOperationException for ProxyStreamProducer#getAction()

Signed-off-by: Rishabh Maurya <[email protected]>

* refactor error handling

Signed-off-by: Rishabh Maurya <[email protected]>

---------

Signed-off-by: Rishabh Maurya <[email protected]>
Signed-off-by: Harsh Kothari <[email protected]>
Harsh-87 pushed a commit to Harsh-87/OpenSearch that referenced this pull request May 7, 2025
* make use of extendedPlugins provide runtime dependencies for arrow-memrory-core

Signed-off-by: Rishabh Maurya <[email protected]>

* merged opensearch-arrow-core into arrow-flight-rpc plugin

Signed-off-by: Rishabh Maurya <[email protected]>

* moved libs:arrow-spi to server module

Signed-off-by: Rishabh Maurya <[email protected]>

* Flight producer changes

Signed-off-by: Rishabh Maurya <[email protected]>

* add hook in StreamManager plugin to get its instance on initialization

Signed-off-by: Rishabh Maurya <[email protected]>

* Minor refactor

Signed-off-by: Rishabh Maurya <[email protected]>

* Add more unit tests and address PR comment

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* defer setting BufferAllocator in FlightStreamManager

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* Refactor BaseFlightProducer and improved error handling

Signed-off-by: Rishabh Maurya <[email protected]>

* Address PR comments

Signed-off-by: Rishabh Maurya <[email protected]>

* refactor and improve test coverage

Signed-off-by: Rishabh Maurya <[email protected]>

* throw UnsupportedOperationException for ProxyStreamProducer#getAction()

Signed-off-by: Rishabh Maurya <[email protected]>

* refactor error handling

Signed-off-by: Rishabh Maurya <[email protected]>

---------

Signed-off-by: Rishabh Maurya <[email protected]>
Signed-off-by: Harsh Kothari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement or improvement to existing feature or request Search:Performance skip-changelog

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature Request] Base Flight producer for FlightServer

3 participants