Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21492

CellCodec Written To WAL Before It's Verified

    XMLWordPrintableJSON

Details

    • Incompatible change, Reviewed
    • Hide
      After HBASE-21492 the return type of WALCellCodec#getWALCellCodecClass has been changed from String to Class
      Show
      After HBASE-21492 the return type of WALCellCodec#getWALCellCodecClass has been changed from String to Class

    Description

      The cell codec class name is written into the WAL file, but the cell codec class is not actually verified to exist. Therefore, users can inadvertently configure an invalid class name and it will be recorded into the WAL file. At that point, the WAL file becomes unreadable and blocks processing of all other WAL files.

      AbstractProtobufLogWriter.java
        private WALHeader buildWALHeader0(Configuration conf, WALHeader.Builder builder) {
          if (!builder.hasWriterClsName()) {
            builder.setWriterClsName(getWriterClassName());
          }
          if (!builder.hasCellCodecClsName()) {
            builder.setCellCodecClsName(WALCellCodec.getWALCellCodecClass(conf));
          }
          return builder.build();
        }
      

      https://github.com/apache/hbase/blob/025ddce868eb06b4072b5152c5ffae5a01e7ae30/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractProtobufLogWriter.java#L78-L86

      Attachments

        1. HBASE-21492.1.patch
          4 kB
          David Mollitor
        2. HBASE-21492.2.patch
          5 kB
          Michael Stack
        3. HBASE-21492.2.patch
          5 kB
          David Mollitor
        4. HBASE-21492-branch-1.patch
          5 kB
          Andrew Kyle Purtell

        Activity

          People

            belugabehr David Mollitor
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: