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

[Backport 2.x] [Refactor] OpenSearchException streamables to a registry (#7646) #8525

Merged

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Jul 7, 2023

Backport db0933b from #7646.

…project#7646)

OpenSearchException uses an enumerator to create a handler for each
serializable Exception implementation. The enumerator is to make it easy
to store in an immutable map. The problem with this Hack is that it
makes it difficult to unwind the tight coupling of StreamInput with the
OpenSearchException class. This commit switches from using an enumerator
to a registry in the opensearch-core library in order to support
serverless and cloud native implementations outside of the server
module.

This commit also refactors base primitive serialization readers and
writers from StreamInput and StreamOutput to BaseStreamInput and
BaseStreamOutput, respectively.

Signed-off-by: Nicholas Walter Knize <[email protected]>
@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments v2.9.0 'Issues and PRs related to version v2.9.0' labels Jul 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #8525 (0e2713a) into 2.x (fa9300d) will increase coverage by 0.06%.
The diff coverage is 94.55%.

@@             Coverage Diff              @@
##                2.x    #8525      +/-   ##
============================================
+ Coverage     70.57%   70.63%   +0.06%     
- Complexity    57097    57106       +9     
============================================
  Files          4748     4748              
  Lines        270593   270610      +17     
  Branches      39942    39941       -1     
============================================
+ Hits         190975   191158     +183     
+ Misses        63218    63015     -203     
- Partials      16400    16437      +37     
Impacted Files Coverage Δ
.../org/opensearch/common/util/LongHashBenchmark.java 0.00% <ø> (ø)
.../org/opensearch/core/common/lease/Releasables.java 78.78% <ø> (ø)
...gregations/matrix/stats/MatrixStatsAggregator.java 82.50% <ø> (-5.00%) ⬇️
...aggregations/bucket/geogrid/GeoGridAggregator.java 87.50% <ø> (ø)
...regations/metrics/AbstractGeoBoundsAggregator.java 56.52% <ø> (ø)
...search/join/aggregations/ParentJoinAggregator.java 73.91% <ø> (ø)
.../transport/netty4/Netty4MessageChannelHandler.java 63.80% <ø> (ø)
...g/opensearch/transport/netty4/Netty4Transport.java 73.65% <ø> (ø)
.../opensearch/transport/nio/TcpReadWriteHandler.java 100.00% <ø> (ø)
...s/close/TransportVerifyShardBeforeCloseAction.java 64.70% <ø> (ø)
... and 141 more

... and 417 files with indirect coverage changes

@andrross andrross merged commit c0177cf into opensearch-project:2.x Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request v2.9.0 'Issues and PRs related to version v2.9.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants