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

Order of locks in optimistic locking is not strict

    XMLWordPrintable

Details

    • Quality Risk
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Out of Date
    • 5.1.8.Final, 5.2.0.Beta3
    • None
    • Transactions
    • None

    Description

      In OptimisticLockingInterceptor, the keys are ordered according to their hash. However, the hashes can still collide, which may result in a deadlock if two keys with identical hash (only 32-bit) are sorted to different order. We should try to check if the keys are Comparable or let user provide some comparator class in config, and use the compare of hash only as the last resort.
      In all cases, a warning should be emitted if the compare operation had non-strict result.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: