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

Read Only transaction optimization doesn't work properly for RepeatableRead

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.0.0.Beta2
    • 6.0.0.Beta1
    • Transactions
    • None

    Description

      There is a readOnly optimization that Infinispan does to make sure we don't do a 2PC when there is no data to update. However the code for this does

         public boolean isReadOnly() {
            return (modifications == null || modifications.isEmpty()) && (lookedUpEntries == null || lookedUpEntries.isEmpty());
         }
      

      For repeatable read we always add a value to lookedUpEntries so this optimization never works that isolation level.

      Looking closer it seems we do a 1PC when it is readOnly to clean up values, so there shouldn't be a need to care about lookedUpEntries (my guess is this was done as a way to test for locks).

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            wburns@redhat.com Will Burns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: