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

CheckAndPut should properly read MVCC

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.95.2
    • Fix Version/s: 0.94.3, 0.95.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      See, for example:

      // TODO: Use MVCC to make this set of increments atomic to reads
      

      Here's an example of what I can happen (would probably be good to write up a test case for each read/update):
      Concurrent update via increment and put.

      The put grabs the row lock first and updates the memstore, but releases the row lock before the MVCC is advanced. Then, the increment grabs the row lock and reads right away, reading the old value and incrementing based on that.

      There are a few options here:
      1) Waiting for the MVCC to advance for read/updates: the downside is that you have to wait for updates on other rows.

      2) Have an MVCC per-row (table configuration): this avoids the unnecessary contention of 1)

      3) Transform the read/updates to write-only with rollup on read.. E.g. an increment would just have the number of values to increment.

        Attachments

        1. 7051.txt
          0.7 kB
          Lars Hofhansl

        Issue Links

          Activity

            People

            • Assignee:
              larsh Lars Hofhansl
              Reporter:
              gchanan Gregory Chanan

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment