-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
ZOOKEEPER-4515: ZK Cli quit command always logs error #1856
Conversation
arshadmohammad
commented
Apr 8, 2022
- For connection closing state scenario, changed the log level to debug
- When JVM exiting with code 0, then logging info instead of error
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error
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.
Thanks for your contribution @arshadmohammad! Generally looks good. Minor comments inline.
if (LOG.isDebugEnabled()) { | ||
LOG.debug( | ||
"An exception was thrown while closing send thread for session 0x{}.", | ||
Long.toHexString(getSessionId()), e); | ||
} |
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.
IIUC LOG.debug
already contains a call to LOG.isDebugEnabled
.
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 is not a core code flow. So for me it is ok to go either way.
I have put debug enable check to void unnecessary toHexString call.
shall we keep as it is or shall it change it?
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.
Thanks for your explanation. Then we can keep as is.
zookeeper-server/src/main/java/org/apache/zookeeper/util/ServiceUtils.java
Show resolved
Hide resolved
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.
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.
Very good
Please chery pick to all active branches |
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes #1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error (cherry picked from commit e5f84f4) Signed-off-by: Mohammad Arshad <arshad@apache.org>
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes #1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error (cherry picked from commit e5f84f4) Signed-off-by: Mohammad Arshad <arshad@apache.org>
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes #1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error (cherry picked from commit e5f84f4) Signed-off-by: Mohammad Arshad <arshad@apache.org>
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes apache#1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes apache#1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Co-authored-by: Mohammad Arshad <arshad@apache.org>
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes apache#1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes apache#1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Co-authored-by: Mohammad Arshad <arshad@apache.org>
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes apache#1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error (cherry picked from commit e5f84f4) Signed-off-by: Mohammad Arshad <arshad@apache.org>
1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error Author: Mohammad Arshad <arshad@apache.org> Reviewers: tison <wander4096@gmail.com>, Enrico Olivelli <eolivelli@apache.org> Closes apache#1856 from arshadmohammad/ZOOKEEPER-4515-cli and squashes the following commits: e7e248b [Mohammad Arshad] Logging error only when exit code is non zero 31e124a [Mohammad Arshad] ZOOKEEPER-4515: ZK Cli quit command always logs error 1. For connection closing state scenario, changed the log level to debug 2. When JVM exiting with code 0, then logging info instead of error (cherry picked from commit e5f84f4) Signed-off-by: Mohammad Arshad <arshad@apache.org>
@arshadmohammad Could you please apply the same fix to 3.8.0 version? |