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

LazyStripedExecutor performs synchronization on AtomicReferenceArray

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0
    • None

    Description

      Issue detected by SpotBugs. Specifically the warning reported is:

      M M JLM_JSR166_UTILCONCURRENT_MONITORENTER JLM: Synchronization performed on java.util.concurrent.atomic.AtomicReferenceArray in org.apache.ignite.internal.network.LazyStripedExecutors.stripedExecutorFor(short)  At LazyStripedExecutors.java:[line 71]
      

      Instances of java.util.concurrent.atomic classes have their own concurrency control mechanisms that are orthogonal to the synchronization provided by the Java keyword synchronized. For example, synchronizing on an AtomicBoolean will not prevent other threads from modifying the AtomicBoolean.

      Such code may be correct, but should be carefully reviewed and documented, and may confuse people who have to maintain the code at a later date.

      Investigate whenever this is a false-positive and we should suppress it, or we should make a proper fix.
      At the result of investigation corresponding TODO should be removed in spotbugs-excludes.xml

      Attachments

        Issue Links

          Activity

            People

              rpuch Roman Puchkovskiy
              vblinov Viacheslav Blinov
              Viacheslav Blinov Viacheslav Blinov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 0.5h
                  0.5h