You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2021/02/23 22:57:10 UTC

[hbase] branch branch-2.2 updated: HBASE-25556 Frequent replication "Encountered a malformed edit" warnings (#2965)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new ecdc942  HBASE-25556 Frequent replication "Encountered a malformed edit" warnings (#2965)
ecdc942 is described below

commit ecdc9429ffca855708a0b65a9cd833ac3d46d13f
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Tue Feb 23 14:38:45 2021 -0800

    HBASE-25556 Frequent replication "Encountered a malformed edit" warnings (#2965)
    
    ProtobufLogReader#readNext may be called by code that attempts to advance
    the reader but does not necessarily expect to succeed, for example
    WALEntryStream#tryAdvanceEntry. Much of the logging in this method is
    at TRACE level. Other logging at WARN level will be frequently emitted, as
    often as several per minute, and this will cause false positive assessment
    from operators that they are experiencing a bug. Fix the mixed intent with
    respect to log levels in readNext. Log at only DEBUG level or below.
    
    Signed-off-by: Sean Busbey <bu...@apache.org>
---
 .../org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
index 008789f..43c6e92 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java
@@ -408,14 +408,14 @@ public class ProtobufLogReader extends ReaderBase {
     } catch (EOFException eof) {
       // If originalPosition is < 0, it is rubbish and we cannot use it (probably local fs)
       if (originalPosition < 0) {
-        LOG.warn("Encountered a malformed edit, but can't seek back to last good position "
+        LOG.debug("Encountered a malformed edit, but can't seek back to last good position "
           + "because originalPosition is negative. last offset={}", this.inputStream.getPos(), eof);
         throw eof;
       }
       // If stuck at the same place and we got and exception, lets go back at the beginning.
       if (inputStream.getPos() == originalPosition) {
         if (resetPosition) {
-          LOG.warn("Encountered a malformed edit, seeking to the beginning of the WAL since "
+          LOG.debug("Encountered a malformed edit, seeking to the beginning of the WAL since "
             + "current position and original position match at {}", originalPosition);
           seekOnFs(0);
         } else {
@@ -424,7 +424,7 @@ public class ProtobufLogReader extends ReaderBase {
       } else {
         // Else restore our position to original location in hope that next time through we will
         // read successfully.
-        LOG.warn("Encountered a malformed edit, seeking back to last good position in file, "
+        LOG.debug("Encountered a malformed edit, seeking back to last good position in file, "
           + "from {} to {}", inputStream.getPos(), originalPosition, eof);
         seekOnFs(originalPosition);
       }