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

Always overwrite the TS for Append/Increment unless no existing cells are found

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.0.0
    • API, Client
    • Incompatible change, Reviewed
    • If there is no existing cell in submitting Append/Increment, the custom ts won't be overridden. By contrast, the cell's ts will always be overridden by server.

    Description

      We don't pass the custom timestamp for Increment, and the increment's timestamp always be rewrite. Hence, user can't increment a cell with custom timestamp.

      ProtobufUtil.java
            if (values != null && values.size() > 0) {
              for (Cell cell: values) {
                valueBuilder.clear();
                valueBuilder.setQualifier(UnsafeByteOperations.unsafeWrap(
                    cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength()));
                valueBuilder.setValue(UnsafeByteOperations.unsafeWrap(
                    cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()));
                if (cell.getTagsLength() > 0) {
                  valueBuilder.setTags(UnsafeByteOperations.unsafeWrap(cell.getTagsArray(),
                      cell.getTagsOffset(), cell.getTagsLength()));
                }
                columnBuilder.addQualifierValue(valueBuilder.build());
              }
            }
      

      In contrast to Increment, user can append the cell with custom timestamp. It would be better that make their behavior consistent.

      Attachments

        1. HBASE-18546.v0.patch
          16 kB
          Chia-Ping Tsai
        2. HBASE-18546.v1.patch
          55 kB
          Chia-Ping Tsai
        3. HBASE-18546.v2.patch
          49 kB
          Chia-Ping Tsai
        4. HBASE-18546.v3.patch
          50 kB
          Chia-Ping Tsai

        Issue Links

          Activity

            People

              chia7712 Chia-Ping Tsai
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: