[ 
https://issues.apache.org/jira/browse/IGNITE-21693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Viacheslav Blinov updated IGNITE-21693:
---------------------------------------
    Description: 
Issue detected by SpotBugs. Specifically the warning reported is:
{noformat}
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]
{noformat}

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

  was:
Issue detected by SpotBugs but is also highlighted by Idea inspection. 
Specifically the warning reported is:
{noformat}
M P UPM_UNCALLED_PRIVATE_METHOD UPM: Private method 
org.apache.ignite.internal.pagememory.freelist.AbstractFreeList.initReusedPage(Storable,
 long, IoStatisticsHolder) is never called  At AbstractFreeList.java:[lines 
707-726]
{noformat}

Method `initReusedPage` is never called which can be an indicator of an issue.

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


> TxManagerImpl increments/decrements volatile field `inflights`
> --------------------------------------------------------------
>
>                 Key: IGNITE-21693
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21693
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Viacheslav Blinov
>            Priority: Minor
>
> Issue detected by SpotBugs. Specifically the warning reported is:
> {noformat}
> 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]
> {noformat}
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to