busbey commented on a change in pull request #2219:
URL: https://github.com/apache/hbase/pull/2219#discussion_r471028927



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java
##########
@@ -199,6 +199,10 @@ public void close() {
     if (!closed.compareAndSet(false, true)) {
       return;
     }
+    LOG.info("Connection has been closed by {}.", 
Thread.currentThread().getName());

Review comment:
       For background, I left a longer comment awhile ago on HBASE-24686 where 
I asked for some indication of the close at info and the stack trace at debug.
   
   we already have other things that get logged at INFO when a connection is 
closing, but it's incidental and could happen in other ways. so an INFO message 
that clearly demarcates connection close is a thing I *really* want from this 
change. Enough so that I am sure I'll be back requesting it again the very next 
time I run into a production problem where I don't see the message, because 
almost no one I support runs DEBUG in production as a matter of course. Most of 
the times where this log message would have helped me in the last ~6 months the 
thread name and an unambiguous "we closed the connection" would suffice.
   
   the stack trace would help with a specific problem we hit in a dev set up 
with an apparent bug in the hmaster. It did not happen often but it did happen 
regularly, so changing the log level to DEBUG to see a stack trace would have 
worked fine for us.
   
   If you feel strongly about not having the messages at different log levels, 
@virajjasani, I'd rather see both at INFO then both at DEBUG, even though I 
generally am against non-error related stack traces at log levels above DEBUG.




----------------------------------------------------------------
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:
[email protected]


Reply via email to