Vladimir Steshin created IGNITE-18343:
-----------------------------------------

             Summary: Refactor partition counters APIs.
                 Key: IGNITE-18343
                 URL: https://issues.apache.org/jira/browse/IGNITE-18343
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vladimir Steshin


The suggestion is to simplify and separate the counters API. 
`PartitionUpdateCounter` should be splited into transactional and amotic. 
Unwrap where neded. Atomic caches have no LWM/HWM and related methods. The 
methods namings should be improved and correspond to the javadocs like 
lwm()/hwm().
Also, looks like MVCC couneters might have own implementation. We should 
consider transaction model when working and storeing the counters.

Suggestions to improve:

1. 'get()' should be renamed to 'lwm()'

2. 'reserved()' -> 'hwm()' which is probably highestAppliedCounter().
'reserved()' is uncertain. It is only for primary node. Do we need it in a 
interface? Should be removed.
It is used only in CacheContinuousQueryHandler, see [1].

3. Many setters 'update()' / 'update(long start, long delta)' / 'next()' / 
'next(long delta)' / 'reset()' / 'resetInitial()' look over-engineered.

4. 'next()' and 'next(long delta)' have wierd implementations in 
PartitionUpdateCounterTrackingImpl. 'next(long delta)' doesn't update the 
reserved counter. Shoulbe be revised.

Related design doc: 
https://cwiki.apache.org/confluence/display/IGNITE/Data+consistency

[1] https://issues.apache.org/jira/browse/IGNITE-18281



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

Reply via email to