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

Handling of value argument being null for checkAndDelete

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • Phoenix

    Description

      IMO, it would be more useful if when a null is supplied as the value for checkAndDelete, that it add the Delete marker if the row exists rather than if it doesn't exist (i.e. the opposite of checkAndPut). I think the most common use case for checkAndDelete is to delete a row if it exists and tell me that you deleted it. With the current implementation, it adds a Delete marker only if the row does not exist when you supply a null value which IMO is not very useful.

      My workaround is to add another "known" KeyValue to my row with a fixed value and then call checkAndDelete passing in this known value. Also, FWIW, if an empty byte array is passed through (a valid value), it treats it the same as if null was passed through, which is another separate bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jamestaylor James R. Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: