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

Stale reads from ZK can break the atomic CAS operations we have in ZKAssign

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.89.20100621, 0.89.20100924, 0.90.0
    • 0.90.0
    • Zookeeper
    • None
    • Reviewed

    Description

      With ZK based region transitions, we rely on atomic state changes of regions in transition. For example, an RS needs to atomically switch a node from OFFLINE to OPENING, or the master needs to delete nodes that are in OPENED state, etc...

      The way we implement this is by:

      • Read existing data (returns byte[] and version in Stat)
      • Verify data is in expected state
      • Update to the new state, passing the expected version previously read

      This doesn't always work as expected because that initial read of the existing data could be a stale read (in ZK, writes are quorum writes but reads are not so you can get stale data).

      Can provide a more explicit example if anyone is interested, but a fix is coming.

      Attachments

        Issue Links

          Activity

            People

              streamy Jonathan Gray
              streamy Jonathan Gray
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: