HDFS-14693. NameNode should log a warning when EditLog IPC logger's pending size exceeds limit. Contributed by Xudong Cao.

This commit is contained in:
Wei-Chiu Chuang 2019-08-08 13:50:30 -07:00
parent 2265872c2d
commit 6ad9a11494
1 changed files with 4 additions and 0 deletions

View File

@ -492,6 +492,10 @@ public class IPCLoggerChannel implements AsyncLogger {
Preconditions.checkArgument(size >= 0);
if (queuedEditsSizeBytes + size > queueSizeLimitBytes &&
queuedEditsSizeBytes > 0) {
QuorumJournalManager.LOG.warn("Pending edits to " + IPCLoggerChannel.this
+ " is going to exceed limit size: " + queueSizeLimitBytes
+ ", current queued edits size: " + queuedEditsSizeBytes
+ ", will silently drop " + size + " bytes of edits!");
throw new LoggerTooFarBehindException();
}
queuedEditsSizeBytes += size;