log error when ReadEntryProcessor IOException#4199
log error when ReadEntryProcessor IOException#4199AnonHxy wants to merge 2 commits intoapache:masterfrom
Conversation
| if (LOG.isDebugEnabled()) { | ||
| LOG.debug("Error reading {}", request, e); | ||
| } | ||
| LOG.error("IOException while reading {}", request, e); |
There was a problem hiding this comment.
I believe this would print the whole stack trace every time a client gets a connectivity error with any bookie, for each entry that we're trying to read.
There was a problem hiding this comment.
whole stack trace every time a client gets a connectivity error with any bookie
Thanks for your review @merlimat . But I don't get your point. This method runs only on serever side and probability throw IOException if read an entry from storage. So I think it doesn't matter with client print logs
There was a problem hiding this comment.
Pring ledgerId:entryId instead of the whole request content?
There was a problem hiding this comment.
I think print whole request is OK. because ReadRequest has overwrite the toString method:
@hangc0276
There was a problem hiding this comment.
I believe this would print the whole stack trace every time a client gets a connectivity error with any bookie, for each entry that we're trying to read.
If the target entry does not exist on the bookie, it will throw NoLedgerException or NoEntryException and won't go into this code path. @merlimat Do you have any concern?
There was a problem hiding this comment.
I believe this would print the whole stack trace every time a client gets a connectivity error with any bookie, for each entry that we're trying to read.
If the target entry does not exist on the bookie, it will throw NoLedgerException or NoEntryException and won't go into this code path. @merlimat Do you have any concern?
The NoLedgerException and NoEntryException extend IOException, it should be caught.
|
@merlimat Could you please take a look again? |
Descriptions of the changes in this PR:
Motivation
Change the log-level to error when
ReadEntryProcessorthrowIOException. The reason is that:IOExceptionshould not happen frequently,so the error log will not print too muchReadEntryProcessorV3has printed the error logbookkeeper/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadEntryProcessorV3.java
Lines 233 to 236 in dc2bb1d
Changes
log.debug->log.error