[jira] [Created] (IGNITE-13949) Insufficient synchronisation in PartitionUpdateCounterTrackingImpl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IGNITE-13949) Insufficient synchronisation in PartitionUpdateCounterTrackingImpl

Anton Vinogradov (Jira)
Yaroslav Molochkov created IGNITE-13949:
-------------------------------------------

             Summary: Insufficient synchronisation in PartitionUpdateCounterTrackingImpl
                 Key: IGNITE-13949
                 URL: https://issues.apache.org/jira/browse/IGNITE-13949
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.9.1
            Reporter: Yaroslav Molochkov
            Assignee: Yaroslav Molochkov


Right now org.apache.ignite.internal.processors.cache.PartitionUpdateCounterTrackingImpl has 2 AtomicLong variables, cntr and reserveCntr, but there are some methods, that are unsynchronised, e.g. next:
{code:java}
@Override public long next() {
    long next = cntr.incrementAndGet();

    reserveCntr.set(next);

    return next;
} {code}

Even though both are AtomicLong, operation like "get then set" is a composite one and should be atomic in the context of an object that holds these variables.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)