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

TxManagerImpl increments/decrements volatile field `inflights`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • None
    • None
    • None
    • Docs Required, Release Notes Required

    Description

      Issue detected by SpotBugs. Specifically the warning reported is:

      H M VO_VOLATILE_INCREMENT VO: Increment of volatile field org.apache.ignite.internal.tx.impl.TxManagerImpl$TxContext.inflights in org.apache.ignite.internal.tx.impl.TxManagerImpl.lambda$addInflight$21(boolean[], UUID, TxManagerImpl$TxContext)  At TxManagerImpl.java:[line 843]
      H M VO_VOLATILE_INCREMENT VO: Increment of volatile field org.apache.ignite.internal.tx.impl.TxManagerImpl$TxContext.inflights in org.apache.ignite.internal.tx.impl.TxManagerImpl.lambda$removeInflight$22(UUID, TxManagerImpl$TxContext)  At TxManagerImpl.java:[line 858]
      

      Increments/Decrements of volatile fields aren't atomic. If more than one thread is incrementing/decrementing the field at the same time, increments/decrements could be lost.

      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

              Unassigned Unassigned
              vblinov Viacheslav Blinov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: