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

[Backport 2.x] [Refactor] CircuitBreaker foundation classes to core library (#9006) #9054

Merged

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Aug 2, 2023

Backport 639d28a from #9006.

…rch-project#9006)

This commit refactors the following CircuitBreaker foundation classes
from the server module to the core library:

* o.o.common.breaker.CircuitBreaker
* o.o.common.breaker.CircuitBreakingException
* o.o.common.breaker.NoopCircuitBreaker
* o.o.indices.breaker.AllCircuitBreakerStats
* o.o.indices.breaker.CircuitBreakerService
* o.o.indices.breaker.CircuitBreakerStats
* o.o.indices.breaker.NoneCircuitBreakerService

The following base support classes are also refactored from the server
to appropriate common or core libraries as a side effect:

* o.o.common.component.AbstractLifecycleComponent
* o.o.common.component.Lifecycle
* o.o.common.component.LifecycleComponent
* o.o.common.component.LifecycleListener
* o.o.common.unit.ByteSizeUnit
* o.o.common.unit.ByteSizeValue

Tests and documentation are updated.

Signed-off-by: Nicholas Walter Knize <[email protected]>
(cherry picked from commit 639d28a)
@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments skip-changelog v2.10.0 labels Aug 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #9054 (1ed094a) into 2.x (2d67a53) will increase coverage by 0.08%.
Report is 1 commits behind head on 2.x.
The diff coverage is 71.57%.

@@             Coverage Diff              @@
##                2.x    #9054      +/-   ##
============================================
+ Coverage     70.80%   70.88%   +0.08%     
- Complexity    57422    57459      +37     
============================================
  Files          4749     4749              
  Lines        271380   271376       -4     
  Branches      40048    40051       +3     
============================================
+ Hits         192156   192376     +220     
+ Misses        62735    62482     -253     
- Partials      16489    16518      +29     
Files Changed Coverage Δ
...earch/client/indices/DataStreamsStatsResponse.java 74.35% <ø> (ø)
...a/org/opensearch/client/indices/ResizeRequest.java 83.78% <ø> (ø)
...earch/client/indices/rollover/RolloverRequest.java 84.61% <ø> (+12.82%) ⬆️
...h/common/lifecycle/AbstractLifecycleComponent.java 92.15% <ø> (ø)
...ava/org/opensearch/common/lifecycle/Lifecycle.java 54.83% <ø> (ø)
...opensearch/common/lifecycle/LifecycleListener.java 85.71% <ø> (ø)
.../java/org/opensearch/OpenSearchParseException.java 71.42% <ø> (ø)
...opensearch/core/common/breaker/CircuitBreaker.java 75.00% <ø> (ø)
.../core/common/breaker/CircuitBreakingException.java 89.28% <ø> (ø)
...search/core/common/breaker/NoopCircuitBreaker.java 61.53% <ø> (ø)
... and 190 more

... and 449 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request skip-changelog v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants