Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10029

Transactional invalidation cache with shared store prone to stale reads, even with FORCE_WRITE_LOCK

    Details

    • Sprint:
      DataGrid Sprint #29
    • Workaround Description:
      Hide

      Consider 2 nodes, A & B, containing a single cache entry with

      {key = K, value = 1}

      Consider 2 application threads (X & Y) accessing the key = K:

      1. X starts tx on A
      2. X reads key = K using FORCE_WRITE_LOCK, returning value = 1
      3. X updates key = K with value = 2
      4. Y starts tx on B
      5. Y reads key = K using FORCE_WRITE_LOCK
      6. X commits tx

      #5 should block until #6 is complete and return 2. However, it returns 1.

      Show
      Consider 2 nodes, A & B, containing a single cache entry with {key = K, value = 1} Consider 2 application threads (X & Y) accessing the key = K: 1. X starts tx on A 2. X reads key = K using FORCE_WRITE_LOCK, returning value = 1 3. X updates key = K with value = 2 4. Y starts tx on B 5. Y reads key = K using FORCE_WRITE_LOCK 6. X commits tx #5 should block until #6 is complete and return 2. However, it returns 1.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dan.berindei Dan Berindei
                Reporter:
                pferraro Paul Ferraro
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: