Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13775

U.ReentrantReadWriteLockTracer improper realization.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.10
    • general
    • None
    • JVM option: IGNITE_PDS_LOG_CP_READ_LOCK_HOLDERS appends additional info about readlLock holders has partially incorrect code.

    Description

      ReentrantReadWriteLockTracer accepts ReentrantReadWriteLock as a delegate and stores delegates for readLock and writeLock. But ReentrantReadWriteLock#isWriteLockedByCurrentThread uses sync object to evaluate the result instead of writeLock, and ReentrantReadWriteLockTracer has it's own sync object.
      As a result, if ReentrantReadWriteLockTracer is used to create checkpoint lock (when IGNITE_PDS_LOG_CP_READ_LOCK_HOLDERS=true), GridCacheDatabaseSharedManager#checkpointLockIsHeldByThread doesn't work correctly: it returns false when checkpoint lock is acquired.

      Attachments

        1. image-2020-12-01-13-51-39-048.png
          41 kB
          Evgeny Stanilovsky
        2. screenshot-1.png
          34 kB
          Evgeny Stanilovsky

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m