Skip to content

Generic Streamable Registry#7780

Merged
nknize merged 4 commits intoopensearch-project:mainfrom
nknize:writeableRegistry
May 30, 2023
Merged

Generic Streamable Registry#7780
nknize merged 4 commits intoopensearch-project:mainfrom
nknize:writeableRegistry

Conversation

@nknize
Copy link
Copy Markdown
Contributor

@nknize nknize commented May 26, 2023

This PR adds a WriteableRegistry to register generic read / write serialization methods for StreamInput.readGeneric and StreamOutput.writeGeneric. This enables modules, plugins, and libraries to register their own type serialization logic without forcing the class implementation to be in the :server module.

Decoupling this logic also further decouples the StreamInput / StreamOutput transport logic from the server module such that it can be refactored to the core library to support cloud native and serverless implementations.

relates #5910

This commit adds a WriteableRegistry to register generic read / write
serialization methods for StreamInput.readGeneric and
StreamOutput.writeGeneric. This enables modules, plugins, and libraries
to register their own type serialization logic without forcing the class
implementation to be in the :server module.

Decoupling this logic also further decouples the StreamInput /
StreamOutput transport logic from the server module such that it can be
refactored to the core library to support cloud native and serverless
implementations.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchTaskCancellationWithHighCpu

@codecov
Copy link
Copy Markdown

codecov bot commented May 26, 2023

Codecov Report

Merging #7780 (625e7df) into main (adf7e2c) will increase coverage by 0.12%.
The diff coverage is 87.71%.

@@             Coverage Diff              @@
##               main    #7780      +/-   ##
============================================
+ Coverage     70.72%   70.85%   +0.12%     
- Complexity    56146    56179      +33     
============================================
  Files          4682     4683       +1     
  Lines        266102   266113      +11     
  Branches      39070    39075       +5     
============================================
+ Hits         188193   188545     +352     
+ Misses        61935    61609     -326     
+ Partials      15974    15959      -15     
Impacted Files Coverage Δ
.../main/java/org/opensearch/common/geo/GeoPoint.java 88.57% <ø> (-0.62%) ⬇️
...a/org/opensearch/common/io/stream/StreamInput.java 89.01% <ø> (+0.49%) ⬆️
...opensearch/script/JodaCompatibleZonedDateTime.java 38.55% <ø> (-6.71%) ⬇️
...pensearch/core/common/io/stream/BaseWriteable.java 59.09% <53.84%> (-2.45%) ⬇️
...a/org/opensearch/common/io/stream/Streamables.java 96.42% <96.42%> (ø)
.../org/opensearch/common/io/stream/StreamOutput.java 95.18% <100.00%> (+0.22%) ⬆️
...src/main/java/org/opensearch/common/joda/Joda.java 79.61% <100.00%> (+0.75%) ⬆️
...ava/org/opensearch/transport/TransportService.java 79.92% <100.00%> (+0.43%) ⬆️

... and 499 files with indirect coverage changes

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: null ❌
  • URL: null
  • CommitID: 7fb5a6e
    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: Nicholas Walter Knize <nknize@apache.org>
@nknize nknize requested a review from reta May 29, 2023 16:28
@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: null ❌
  • URL: null
  • CommitID: f149cde
    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?

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: null ❌
  • URL: null
  • CommitID: f149cde
    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: Nicholas Walter Knize <nknize@apache.org>
@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchShardTaskCancellationWithHighCpu
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Copy Markdown
Contributor

Gradle Check (Jenkins) Run Completed with:

@nknize nknize merged commit 69f4ac1 into opensearch-project:main May 30, 2023
stephen-crawford pushed a commit to stephen-crawford/OpenSearch that referenced this pull request May 31, 2023
This commit adds a WriteableRegistry to register generic read / write
serialization methods for StreamInput.readGeneric and
StreamOutput.writeGeneric. This enables modules, plugins, and libraries
to register their own type serialization logic without forcing the class
implementation to be in the :server module.

Decoupling this logic also further decouples the StreamInput /
StreamOutput transport logic from the server module such that it can be
refactored to the core library to support cloud native and serverless
implementations.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Jun 2, 2023
This commit adds a WriteableRegistry to register generic read / write
serialization methods for StreamInput.readGeneric and
StreamOutput.writeGeneric. This enables modules, plugins, and libraries
to register their own type serialization logic without forcing the class
implementation to be in the :server module.

Decoupling this logic also further decouples the StreamInput /
StreamOutput transport logic from the server module such that it can be
refactored to the core library to support cloud native and serverless
implementations.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
This commit adds a WriteableRegistry to register generic read / write
serialization methods for StreamInput.readGeneric and
StreamOutput.writeGeneric. This enables modules, plugins, and libraries
to register their own type serialization logic without forcing the class
implementation to be in the :server module.

Decoupling this logic also further decouples the StreamInput /
StreamOutput transport logic from the server module such that it can be
refactored to the core library to support cloud native and serverless
implementations.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
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 skip-changelog 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.

2 participants