You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/01/14 16:21:19 UTC
[GitHub] [zookeeper] ravowlga123 opened a new pull request #1220:
ZOOKEEPER-2293 Log warning msg once by adding flag
ravowlga123 opened a new pull request #1220: ZOOKEEPER-2293 Log warning msg once by adding flag
URL: https://github.com/apache/zookeeper/pull/1220
As per ticket [ZOOKEEPER-2293](https://issues.apache.org/jira/browse/ZOOKEEPER-2293) we need to log warning message just once. For this, I have introduced a boolean flag as false then after logging the message it will be set to true.
Please do let me know if made changes make sense and solves the ticket description as mentioned above.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [zookeeper] eolivelli commented on a change in pull request #1220:
ZOOKEEPER-2293 Log warning msg once by adding flag
Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #1220: ZOOKEEPER-2293 Log warning msg once by adding flag
URL: https://github.com/apache/zookeeper/pull/1220#discussion_r366523635
##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
##########
@@ -1348,15 +1348,19 @@ public void processConnectRequest(ServerCnxn cnxn, ByteBuffer incomingBuffer)
ServerMetrics.getMetrics().CONNECTION_REQUEST_COUNT.add(1);
boolean readOnly = false;
+ boolean logWarning = false;
Review comment:
With **lpgWarning** I would expect a **true** value as initial value.
With current approach I would name the variable as **warningLogged**
Btw did you mean to declare the variable as a instance field?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [zookeeper] ravowlga123 commented on a change in pull request
#1220: ZOOKEEPER-2293 Log warning msg once by adding flag
Posted by GitBox <gi...@apache.org>.
ravowlga123 commented on a change in pull request #1220: ZOOKEEPER-2293 Log warning msg once by adding flag
URL: https://github.com/apache/zookeeper/pull/1220#discussion_r367002795
##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
##########
@@ -1348,15 +1348,19 @@ public void processConnectRequest(ServerCnxn cnxn, ByteBuffer incomingBuffer)
ServerMetrics.getMetrics().CONNECTION_REQUEST_COUNT.add(1);
boolean readOnly = false;
+ boolean logWarning = false;
Review comment:
Hey @eolivelli Thanks for your review. I have changed the variable name as per your suggestion. I didn't mean to declare variable as an instance field but do you think to declare it as an instance field makes more sense?? Please do let me know
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services