-
Notifications
You must be signed in to change notification settings - Fork 133
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
change disk circuit breaker to cluster settings #2634
change disk circuit breaker to cluster settings #2634
Conversation
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
* * Copyright OpenSearch Contributors | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the license header seems not with right format
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
Integer.MAX_VALUE, | ||
Setting.Property.NodeScope, | ||
Setting.Property.Dynamic | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: another alternative could be ByteSizeValue
instead of int. it has more fine-grained control.
/** | ||
* An abstract class for all breakers with threshold. | ||
* @param <T> data type of threshold | ||
*/ | ||
@Data | ||
public abstract class ThresholdCircuitBreaker<T> implements CircuitBreaker { | ||
|
||
private T threshold; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add volatile
modifier for this field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add volatile so that each thread can read the up-to-date value of this.
Signed-off-by: zane-neo <[email protected]>
* change disk circuit breaker to cluster settings Signed-off-by: zane-neo <[email protected]> * Fix IT failure Signed-off-by: zane-neo <[email protected]> * format code Signed-off-by: zane-neo <[email protected]> * fix failure UT Signed-off-by: zane-neo <[email protected]> * fix failure IT Signed-off-by: zane-neo <[email protected]> * Address comments Signed-off-by: zane-neo <[email protected]> --------- Signed-off-by: zane-neo <[email protected]> (cherry picked from commit b6618b2)
* change disk circuit breaker to cluster settings Signed-off-by: zane-neo <[email protected]> * Fix IT failure Signed-off-by: zane-neo <[email protected]> * format code Signed-off-by: zane-neo <[email protected]> * fix failure UT Signed-off-by: zane-neo <[email protected]> * fix failure IT Signed-off-by: zane-neo <[email protected]> * Address comments Signed-off-by: zane-neo <[email protected]> --------- Signed-off-by: zane-neo <[email protected]> (cherry picked from commit b6618b2) Co-authored-by: zane-neo <[email protected]>
Description
change disk circuit breaker to cluster settings
Issues Resolved
#2639
Check List
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.