-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Adding support for handling multiple transport protocols #12967
Conversation
Compatibility status:Checks if related components are compatible with change 3f08cea Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the small PR that we can reason about and get merged.
I don't love the existing naming of these classes. Does it make sense to move and rename things now? I would like folders for different implementations like native
and proto
so there's no confusion that these things are standalone.
For example:
|-transport
|----InboundMessage [an interface only, `getProtocol()`, no `setProtocol()`]
|----native
|- NativeInboundMessage
|----proto
|-ProtoInboundMessage
server/src/main/java/org/opensearch/transport/BaseInboundMessage.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/transport/BaseInboundMessage.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/transport/InboundPipeline.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/transport/InboundPipeline.java
Outdated
Show resolved
Hide resolved
Renaming would definitely make it clearer, I didn't opt it for existing classes since it would be a breaking change no? For example, |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12967 +/- ##
============================================
- Coverage 71.42% 71.39% -0.03%
- Complexity 59978 60457 +479
============================================
Files 4985 5029 +44
Lines 282275 284589 +2314
Branches 40946 41221 +275
============================================
+ Hits 201603 203184 +1581
- Misses 63999 64619 +620
- Partials 16673 16786 +113 ☔ View full report in Codecov by Sentry. |
90966c8
to
8a90d0e
Compare
❌ Gradle check result for 8a90d0e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 8a90d0e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/transport/TcpTransport.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 208d75b: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Vacha Shah <[email protected]>
208d75b
to
3f08cea
Compare
@dblock Can you please take a look at this again? Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks straightforward enough for me, if @reta is cool with it lets merge.
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-12967-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d202d90df3991daaf3e20be325cac4b323f0ed23
# Push it to GitHub
git push --set-upstream origin backport/backport-12967-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
…project#12967) * Adding support for more than one protocol for transport Signed-off-by: Vacha Shah <[email protected]> * Adding CHANGELOG entry Signed-off-by: Vacha Shah <[email protected]> * Addressing comments Signed-off-by: Vacha Shah <[email protected]> * Addressing comments Signed-off-by: Vacha Shah <[email protected]> * Removing determineTransportProtocol Signed-off-by: Vacha Shah <[email protected]> * Determine transport protocol only on first byte reference Signed-off-by: Vacha Shah <[email protected]> * Making InboundBytesHandler closeable Signed-off-by: Vacha Shah <[email protected]> * Fixing close() for InboundPipeline Signed-off-by: Vacha Shah <[email protected]> * Adding DeprecatedAPI annotation to japicmp task Signed-off-by: Vacha Shah <[email protected]> * Fixing for detect breaking changes workflow Signed-off-by: Vacha Shah <[email protected]> * Fixing recursion Signed-off-by: Vacha Shah <[email protected]> --------- Signed-off-by: Vacha Shah <[email protected]>
Backport PR #13125 |
…ls (#12967) (#13125) * Adding support for handling multiple transport protocols (#12967) * Adding support for more than one protocol for transport Signed-off-by: Vacha Shah <[email protected]> * Adding CHANGELOG entry Signed-off-by: Vacha Shah <[email protected]> * Addressing comments Signed-off-by: Vacha Shah <[email protected]> * Addressing comments Signed-off-by: Vacha Shah <[email protected]> * Removing determineTransportProtocol Signed-off-by: Vacha Shah <[email protected]> * Determine transport protocol only on first byte reference Signed-off-by: Vacha Shah <[email protected]> * Making InboundBytesHandler closeable Signed-off-by: Vacha Shah <[email protected]> * Fixing close() for InboundPipeline Signed-off-by: Vacha Shah <[email protected]> * Adding DeprecatedAPI annotation to japicmp task Signed-off-by: Vacha Shah <[email protected]> * Fixing for detect breaking changes workflow Signed-off-by: Vacha Shah <[email protected]> * Fixing recursion Signed-off-by: Vacha Shah <[email protected]> --------- Signed-off-by: Vacha Shah <[email protected]> * Fixing precommit for 2.x Signed-off-by: Vacha Shah <[email protected]> --------- Signed-off-by: Vacha Shah <[email protected]>
…project#12967) * Adding support for more than one protocol for transport Signed-off-by: Vacha Shah <[email protected]> * Adding CHANGELOG entry Signed-off-by: Vacha Shah <[email protected]> * Addressing comments Signed-off-by: Vacha Shah <[email protected]> * Addressing comments Signed-off-by: Vacha Shah <[email protected]> * Removing determineTransportProtocol Signed-off-by: Vacha Shah <[email protected]> * Determine transport protocol only on first byte reference Signed-off-by: Vacha Shah <[email protected]> * Making InboundBytesHandler closeable Signed-off-by: Vacha Shah <[email protected]> * Fixing close() for InboundPipeline Signed-off-by: Vacha Shah <[email protected]> * Adding DeprecatedAPI annotation to japicmp task Signed-off-by: Vacha Shah <[email protected]> * Fixing for detect breaking changes workflow Signed-off-by: Vacha Shah <[email protected]> * Fixing recursion Signed-off-by: Vacha Shah <[email protected]> --------- Signed-off-by: Vacha Shah <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Coming from PR #11910, separating out the transport protocol logic which is part of #11910 into this PR. This PR adds support to make it easier to handle multiple transport protocols.
Related Issues
Check List
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.