You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "qqu0127 (via GitHub)" <gi...@apache.org> on 2023/05/09 15:51:21 UTC

[GitHub] [helix] qqu0127 commented on a diff in pull request #2483: Cleanup - Part 2 - isDebugEnabled() related

qqu0127 commented on code in PR #2483:
URL: https://github.com/apache/helix/pull/2483#discussion_r1188808248


##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkEventThread.java:
##########
@@ -92,9 +92,7 @@ public String toString() {
       while (!isInterrupted()) {
         ZkEvent zkEvent = _events.take();
         int eventId = _eventId.incrementAndGet();
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Delivering event #" + eventId + " " + zkEvent);
-        }
+        LOG.debug("Delivering event #" + eventId + " " + zkEvent);

Review Comment:
   Let's try to use interpolation, otherwise the string concatenation might be unnecessary. 



##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java:
##########
@@ -1867,9 +1856,7 @@ public void run() throws Exception {
   public boolean waitUntilExists(String path, TimeUnit timeUnit, long time)
       throws ZkInterruptedException {
     Date timeout = new Date(System.currentTimeMillis() + timeUnit.toMillis(time));
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("Waiting until znode {} becomes available.", _uid, path);
-    }
+    LOG.debug("Waiting until znode {} becomes available.", _uid, path);

Review Comment:
   Missing one param placeholder?



##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkEventThread.java:
##########
@@ -105,9 +103,7 @@ public String toString() {
         } catch (Throwable e) {
           LOG.error("Error handling event " + zkEvent, e);
         }
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Delivering event #" + eventId + " done");
-        }
+        LOG.debug("Delivering event #" + eventId + " done");

Review Comment:
   same



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org