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

fix remote register model / circuit breaker 500 #2264

Conversation

HenryL27
Copy link
Collaborator

Description

On very rare occasion the memory circuit breaker triggers when registering a remote model. Before this PR, this would throw an exception, and because registerRemoteModel is a actionListener-based method, the error would be dropped and you get a 500 (internal server error) back. This PR moves the circuit breaker check inside the try block so that the exception is caught and 'actionListen'ed.

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.

…stener for register remote model

Signed-off-by: Henry Lindeman <[email protected]>
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.42%. Comparing base (624dfba) to head (8e0a88f).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2264      +/-   ##
============================================
+ Coverage     81.40%   81.42%   +0.01%     
- Complexity     5851     5852       +1     
============================================
  Files           557      557              
  Lines         23877    23877              
  Branches       2494     2494              
============================================
+ Hits          19437    19441       +4     
+ Misses         3418     3414       -4     
  Partials       1022     1022              
Flag Coverage Δ
ml-commons 81.42% <100.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.

@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 22, 2024 21:24 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 22, 2024 21:24 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 22, 2024 21:24 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 22, 2024 21:24 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 22, 2024 21:24 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 22, 2024 21:24 — with GitHub Actions Inactive
@HenryL27 HenryL27 had a problem deploying to ml-commons-cicd-env March 23, 2024 00:03 — with GitHub Actions Failure
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 23, 2024 00:03 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 23, 2024 00:03 — with GitHub Actions Inactive
@HenryL27 HenryL27 temporarily deployed to ml-commons-cicd-env March 23, 2024 00:03 — with GitHub Actions Inactive
@HenryL27 HenryL27 had a problem deploying to ml-commons-cicd-env March 23, 2024 00:51 — with GitHub Actions Failure
@HenryL27 HenryL27 requested a review from dhrubo-os March 25, 2024 16:30
@HenryL27 HenryL27 merged commit 30642e6 into opensearch-project:main Mar 25, 2024
9 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 25, 2024
* move memory CB check into try block to catch exception and hand to listener for register remote model

Signed-off-by: Henry Lindeman <[email protected]>

* add test that memory cb exception is caught by action listener

Signed-off-by: Henry Lindeman <[email protected]>

* unthrow priviledgedExceptionAction

Signed-off-by: Henry Lindeman <[email protected]>

---------

Signed-off-by: Henry Lindeman <[email protected]>
(cherry picked from commit 30642e6)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 25, 2024
* move memory CB check into try block to catch exception and hand to listener for register remote model

Signed-off-by: Henry Lindeman <[email protected]>

* add test that memory cb exception is caught by action listener

Signed-off-by: Henry Lindeman <[email protected]>

* unthrow priviledgedExceptionAction

Signed-off-by: Henry Lindeman <[email protected]>

---------

Signed-off-by: Henry Lindeman <[email protected]>
(cherry picked from commit 30642e6)
HenryL27 added a commit that referenced this pull request Mar 25, 2024
* move memory CB check into try block to catch exception and hand to listener for register remote model

Signed-off-by: Henry Lindeman <[email protected]>

* add test that memory cb exception is caught by action listener

Signed-off-by: Henry Lindeman <[email protected]>

* unthrow priviledgedExceptionAction

Signed-off-by: Henry Lindeman <[email protected]>

---------

Signed-off-by: Henry Lindeman <[email protected]>
(cherry picked from commit 30642e6)

Co-authored-by: Henry Lindeman <[email protected]>
HenryL27 added a commit that referenced this pull request Mar 25, 2024
* move memory CB check into try block to catch exception and hand to listener for register remote model

Signed-off-by: Henry Lindeman <[email protected]>

* add test that memory cb exception is caught by action listener

Signed-off-by: Henry Lindeman <[email protected]>

* unthrow priviledgedExceptionAction

Signed-off-by: Henry Lindeman <[email protected]>

---------

Signed-off-by: Henry Lindeman <[email protected]>
(cherry picked from commit 30642e6)

Co-authored-by: Henry Lindeman <[email protected]>
@HenryL27 HenryL27 deleted the fix-register-remote-circuit-breaker-500 branch March 25, 2024 21:59
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