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

stash thread context before running forward action #1904

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

ylwu-amzn
Copy link
Collaborator

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

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

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.

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (54c788a) 82.61% compared to head (cf7243c) 82.62%.
Report is 1 commits behind head on main.

Files Patch % Lines
...ction/deploy/TransportDeployModelOnNodeAction.java 0.00% 8 Missing ⚠️
.../java/org/opensearch/ml/utils/RestActionUtils.java 75.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1904   +/-   ##
=========================================
  Coverage     82.61%   82.62%           
- Complexity     5383     5388    +5     
=========================================
  Files           521      521           
  Lines         21715    21727   +12     
  Branches       2210     2211    +1     
=========================================
+ Hits          17940    17952   +12     
+ Misses         2878     2875    -3     
- Partials        897      900    +3     
Flag Coverage Δ
ml-commons 82.62% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

deployModelDoneMessage,
new ActionListenerResponseHandler<>(taskDoneListener, MLForwardResponse::new)
);
try (ThreadContext.StoredContext context = client.threadPool().getThreadContext().stashContext()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change should fix the issue when multiple threads running in progress.

@ylwu-amzn ylwu-amzn merged commit a14521d into opensearch-project:main Jan 23, 2024
12 of 17 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.9 failed:

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

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.9 2.9
# Navigate to the new working tree
cd .worktrees/backport-2.9
# Create a new branch
git switch --create backport/backport-1904-to-2.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a14521dd97397c2ec9f6899e5d7d2f450986a5f9
# Push it to GitHub
git push --set-upstream origin backport/backport-1904-to-2.9
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.9

Then, create a pull request where the base branch is 2.9 and the compare/head branch is backport/backport-1904-to-2.9.

opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 23, 2024
Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a14521d)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 23, 2024
Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a14521d)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 23, 2024
Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a14521d)
ylwu-amzn added a commit that referenced this pull request Jan 23, 2024
Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a14521d)

Co-authored-by: Yaliang Wu <[email protected]>
ylwu-amzn added a commit that referenced this pull request Jan 23, 2024
Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a14521d)

Co-authored-by: Yaliang Wu <[email protected]>
ylwu-amzn added a commit that referenced this pull request Jan 23, 2024
Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a14521d)

Co-authored-by: Yaliang Wu <[email protected]>
ylwu-amzn added a commit to ylwu-amzn/ml-commons that referenced this pull request Jan 23, 2024
mingshl pushed a commit that referenced this pull request Jan 23, 2024
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants