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

Should we check zero length value in checkAndMutate when null is passes as expected value?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Should we check zero length value in checkAndMutate when null is passes as expected value?
      If yes, then I think we should update the documentation for checkAndPut with the same as sometimes column are used for marker with empty byte array.

      If the passed value is null, the check
         * is for the lack of column (ie: non-existance)
      boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
          byte[] value, Put put) throws IOException;
      

      otherwise , we should remove this check.

      HRegion.class
      
      @Override
        public boolean checkAndMutate(byte [] row, byte [] family, byte [] qualifier,
            CompareOp compareOp, ByteArrayComparable comparator, Mutation w,
            boolean writeToWAL)
        throws IOException{
      ...
      else if (result.size() > 0 && result.get(0).getValueLength() == 0 &&
                  valueIsNull) {
                matches = true;
              }
      
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ankit.singhal Ankit Singhal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: