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

[Extensions] Replace latches with CompletableFutures for extensions #5646

Merged
merged 13 commits into from
Jan 20, 2023

Conversation

ryanbogan
Copy link
Member

@ryanbogan ryanbogan commented Dec 27, 2022

Signed-off-by: Ryan Bogan rbogan@amazon.com

Description

Removes latches and CompletableFuture .get() calls to make requests asynchronous

Issues Resolved

opensearch-project/opensearch-sdk-java#292

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
@ryanbogan ryanbogan changed the title Replace latches with CompletableFutures for extensions [Extensions] Replace latches with CompletableFutures for extensions Dec 27, 2022
Signed-off-by: Ryan Bogan <rbogan@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.allocation.AwarenessAllocationIT.testThreeZoneOneReplicaWithForceZoneValueAndLoadAwareness

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2022

Codecov Report

Merging #5646 (269b146) into main (60db7b5) will decrease coverage by 0.07%.
The diff coverage is 10.14%.

@@             Coverage Diff              @@
##               main    #5646      +/-   ##
============================================
- Coverage     70.82%   70.76%   -0.07%     
+ Complexity    58756    58730      -26     
============================================
  Files          4770     4770              
  Lines        280721   280756      +35     
  Branches      40536    40553      +17     
============================================
- Hits         198815   198665     -150     
- Misses        65577    65783     +206     
+ Partials      16329    16308      -21     
Impacted Files Coverage Δ
...rch/extensions/rest/RestSendToExtensionAction.java 26.58% <0.00%> (-2.19%) ⬇️
...a/org/opensearch/extensions/ExtensionsManager.java 47.46% <7.14%> (-8.01%) ⬇️
...sions/action/ExtensionTransportActionsHandler.java 56.25% <19.23%> (-16.34%) ⬇️
...adonly/AddIndexBlockClusterStateUpdateRequest.java 0.00% <0.00%> (-75.00%) ⬇️
...readonly/TransportVerifyShardIndexBlockAction.java 9.75% <0.00%> (-58.54%) ⬇️
.../admin/cluster/reroute/ClusterRerouteResponse.java 60.00% <0.00%> (-40.00%) ⬇️
...h/action/ingest/SimulateDocumentVerboseResult.java 60.71% <0.00%> (-39.29%) ⬇️
...indices/readonly/TransportAddIndexBlockAction.java 20.68% <0.00%> (-37.94%) ⬇️
...luster/routing/allocation/RoutingExplanations.java 62.06% <0.00%> (-37.94%) ⬇️
...ion/admin/cluster/node/info/PluginsAndModules.java 53.12% <0.00%> (-34.38%) ⬇️
... and 475 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testStartReplicaAfterPrimaryIndexesDocs

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
Signed-off-by: Ryan Bogan <rbogan@amazon.com>
Signed-off-by: Ryan Bogan <rbogan@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ryan Bogan <rbogan@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dblock dblock merged commit e2abc47 into opensearch-project:main Jan 20, 2023
@dblock dblock added the backport 2.x Backport to 2.x branch label Jan 20, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-5646-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e2abc4702e94d27e24e64d9b5dbce7b3b136c332
# Push it to GitHub
git push --set-upstream origin backport/backport-5646-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-5646-to-2.x.

@@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add query for initialized extensions ([#5658](https://github.com/opensearch-project/OpenSearch/pull/5658))
- Revert 'Added jackson dependency to server' and change extension reading ([#5768](https://github.com/opensearch-project/OpenSearch/pull/5768))
- Add support to disallow search request with preference parameter with strict weighted shard routing([#5874](https://github.com/opensearch-project/OpenSearch/pull/5874))
- Replace latches with CompletableFutures for extensions ([#5646](https://github.com/opensearch-project/OpenSearch/pull/5646))
Copy link
Member

Choose a reason for hiding this comment

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

@ryanbogan Can you move this entry to the [Unreleased 2.x] section of this file since this is going to be released in the next 2.x version? The fact that this entry was in the wrong spot is possibly the reason why the cherry pick had conflicts on the backport. See the contributing doc for details about where to place your changelog entry.

andrross added a commit to andrross/OpenSearch that referenced this pull request Jan 26, 2023
This commit fixes the changelog entry placement error in opensearch-project#5646

Signed-off-by: Andrew Ross <andrross@amazon.com>
dblock pushed a commit that referenced this pull request Jan 26, 2023
This commit fixes the changelog entry placement error in #5646

Signed-off-by: Andrew Ross <andrross@amazon.com>

Signed-off-by: Andrew Ross <andrross@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants