You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/04/07 17:47:32 UTC

[GitHub] [accumulo] ctubbsii opened a new pull request, #2615: Add details to ZooKeeper watcher logs

ctubbsii opened a new pull request, #2615:
URL: https://github.com/apache/accumulo/pull/2615

   Add more details to the log messages produced while processing ZooKeeper
   WatchedEvents. Also, try to standardize some messages by adding the
   event at the end, after whatever core message is conveyed. Most of the
   time, we won't see these messages, but it definitely helps to have
   greater insight into what event triggered the situation, rather than
   picking out and printing only certain details from the WatchedEvent.


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


[GitHub] [accumulo] ctubbsii commented on pull request #2615: Add details to ZooKeeper watcher logs

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on PR #2615:
URL: https://github.com/apache/accumulo/pull/2615#issuecomment-1092027041

   I thought of this while trying to parse the logs in #2613. More details in the logs for ZK events would help troubleshoot some of the ZK-related log messages we get when integration tests fail, and possibly help troubleshoot production instances as well.


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


[GitHub] [accumulo] ctubbsii merged pull request #2615: Add details to ZooKeeper watcher logs

Posted by GitBox <gi...@apache.org>.
ctubbsii merged PR #2615:
URL: https://github.com/apache/accumulo/pull/2615


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


[GitHub] [accumulo] milleruntime commented on a diff in pull request #2615: Add details to ZooKeeper watcher logs

Posted by GitBox <gi...@apache.org>.
milleruntime commented on code in PR #2615:
URL: https://github.com/apache/accumulo/pull/2615#discussion_r845464179


##########
core/src/main/java/org/apache/accumulo/fate/zookeeper/ServiceLock.java:
##########
@@ -311,22 +311,19 @@ private synchronized void determineLockOwnership(final String createdEphemeralNo
         @Override
         public void process(WatchedEvent event) {
           if (LOG.isTraceEnabled()) {
-            LOG.trace("[{}] Processing event:", vmLockPrefix);
-            LOG.trace("- type  {}", event.getType());
-            LOG.trace("- path  {}", event.getPath());
-            LOG.trace("- state {}", event.getState());
+            LOG.trace("[{}] Processing {}", vmLockPrefix, event);

Review Comment:
   Printing the values in one log statement is nice cause of the likelihood of multiple threads. Does the `WatchedEvent` type toString() print the same values?



-- 
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: notifications-unsubscribe@accumulo.apache.org

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


[GitHub] [accumulo] ctubbsii commented on a diff in pull request #2615: Add details to ZooKeeper watcher logs

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on code in PR #2615:
URL: https://github.com/apache/accumulo/pull/2615#discussion_r845533003


##########
core/src/main/java/org/apache/accumulo/fate/zookeeper/ServiceLock.java:
##########
@@ -311,22 +311,19 @@ private synchronized void determineLockOwnership(final String createdEphemeralNo
         @Override
         public void process(WatchedEvent event) {
           if (LOG.isTraceEnabled()) {
-            LOG.trace("[{}] Processing event:", vmLockPrefix);
-            LOG.trace("- type  {}", event.getType());
-            LOG.trace("- path  {}", event.getPath());
-            LOG.trace("- state {}", event.getState());
+            LOG.trace("[{}] Processing {}", vmLockPrefix, event);

Review Comment:
   Yes, it does. It looks like "WatchedEvent: " followed by those three values. There aren't newlines, but I figured formatting changes here doesn't really matter, since it's a trace log message, and thus should be rarely seen.



-- 
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: notifications-unsubscribe@accumulo.apache.org

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