Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3685

Extra DeleteFamily marker in non tx index table when setting covered column to null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 4.10.0
    • None
    • None

    Description

      Based on some testing (see patch), I noticed a mysterious DeleteFamily marker when a covered column is set to null. This could potentially delete an actual row with that row key, so it's bad.

      Here's a raw scan dump taken after the MutableIndexIT.testCoveredColumns() test:

      ************ dumping IDX_T000002;hconnection-0x211e75ea **************
      \x00a/0:/1487356752097/DeleteFamily/vlen=0/seqid=0 value = 
      x\x00a/0:0:V2/1487356752231/Put/vlen=1/seqid=0 value = 4
      x\x00a/0:0:V2/1487356752225/Put/vlen=1/seqid=0 value = 4
      x\x00a/0:0:V2/1487356752202/Put/vlen=1/seqid=0 value = 3
      x\x00a/0:0:V2/1487356752149/DeleteColumn/vlen=0/seqid=0 value = 
      x\x00a/0:0:V2/1487356752097/Put/vlen=1/seqid=0 value = 1
      x\x00a/0:_0/1487356752231/Put/vlen=2/seqid=0 value = _0
      x\x00a/0:_0/1487356752225/Put/vlen=2/seqid=0 value = _0
      x\x00a/0:_0/1487356752202/Put/vlen=2/seqid=0 value = _0
      x\x00a/0:_0/1487356752149/Put/vlen=2/seqid=0 value = _0
      x\x00a/0:_0/1487356752097/Put/vlen=2/seqid=0 value = _0
      -----------------------------------------------
      

      That first DeleteFamily marker shouldn't be there. This occurs for both global and local indexes, but not for transactional tables. A further optimization would be not to issue the first Put since the value behind it is the same.

      On the plus side, we're not issuing DeleteFamily markers when only the covered column is being set which is good.

      Attachments

        1. PHOENIX-3685-test.patch
          3 kB
          James R. Taylor

        Issue Links

          Activity

            People

              tdsilva Thomas D'Silva
              jamestaylor James R. Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: