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

Call listner.onFailure when lock creation failed #435

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

heemin32
Copy link
Contributor

@heemin32 heemin32 commented Jul 27, 2023

Description

When lockId is too long, it silently call onResponse of listener with null. In such case, we don't know if lock acquire is failed because the lock is being hold by other processor, or lock creation itself is failed. We should call onFailure with exception so that caller can handle such case accordingly.

Issues Resolved

N/A

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.

@saratvemulapalli
Copy link
Member

@heemin32 could you rebase your changes?

@heemin32
Copy link
Contributor Author

heemin32 commented Aug 1, 2023

@heemin32 could you rebase your changes?

Already did.

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #435 (e83b313) into main (acae28c) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main     #435   +/-   ##
=========================================
  Coverage     29.19%   29.19%           
  Complexity       98       98           
=========================================
  Files            22       22           
  Lines          1185     1185           
  Branches        109      109           
=========================================
  Hits            346      346           
  Misses          818      818           
  Partials         21       21           

Copy link
Member

@joshpalis joshpalis left a comment

Choose a reason for hiding this comment

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

Thanks @heemin32 for these changes, lgtm. Lets backport this to 2.x as well

@joshpalis joshpalis merged commit d2e0ac0 into opensearch-project:main Aug 1, 2023
15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 1, 2023
Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit d2e0ac0)
vibrantvarun pushed a commit that referenced this pull request Aug 1, 2023
Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit d2e0ac0)

Co-authored-by: Heemin Kim <[email protected]>
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.

4 participants