-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ZOOKEEPER-3196. Maintain the configuration will be used by server stabilizer.It can be overridden based on the server type and the server system internals. #712
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
base: master
Are you sure you want to change the base?
Conversation
anmolnar
left a comment
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.
Interesting approach and worth to think about. This one duplicates my revert: #711
I leave the decision to @lvfangmin and @hanm as they're the original committers.
zookeeper-server/src/main/java/org/apache/zookeeper/common/ZookeeperServerStabilizerConfig.java
Show resolved
Hide resolved
zookeeper-server/src/main/java/org/apache/zookeeper/common/ZookeeperServerStabilizerConfig.java
Show resolved
Hide resolved
zookeeper-server/src/main/java/org/apache/zookeeper/common/ZookeeperServerStabilizerConfig.java
Outdated
Show resolved
Hide resolved
|
Can we add in the descriptoin the original problem fro findbugs ? |
eolivelli
left a comment
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.
left some questions and comments.
Thank you for working on this
|
@tumativ Given that this is not a straight revert of the failing patch, would you please create a Jira and explain the reasoning in that? |
|
The build is green. It addressed the issues. |
anmolnar
left a comment
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.
+1 lgtm
|
@tumativ Please rebase this patch if you're still working on it. I'd like to commit this. |
|
@eolivelli @lvfangmin PTAL. |
eolivelli
left a comment
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.
Lgtm.
I wonder if we could add any test, the fact that we are using a different value for the Follower will have a real effect so we should ensure that this new behaviour won't change in the future.
Just a single UT will be enough
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
|
|
||
| public class ZookeeperServerStabilizerConfig { |
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.
Can you add some simple description for this class.
| public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider { | ||
| protected static final Logger LOG; | ||
|
|
||
| public static final String GLOBAL_OUTSTANDING_LIMIT = "zookeeper.globalOutstandingLimit"; |
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 remove this one since it's being included in ZookeeperServerStabilizerConfig?
|
@tumativ Sorry for the delay, are u still working on this patch? |
https://issues.apache.org/jira/browse/ZOOKEEPER-3196
Maintain the configuration will be used by server stabilizer. It can be overridden based on the server type and the server system internals.
-Avoid calculating the globalOutstandingLimit for every request as it is not going to be changed for every request.
-we are reading globalOutstandingLimit from the system property and parsing the value at every call of shouldThrottle. So it can be taken from config. It will act as the cache.