Alexey Scherbakov created IGNITE-13395:
------------------------------------------

             Summary: Get rid of partition group reservations.
                 Key: IGNITE-13395
                 URL: https://issues.apache.org/jira/browse/IGNITE-13395
             Project: Ignite
          Issue Type: Improvement
    Affects Versions: 2.9
            Reporter: Alexey Scherbakov
             Fix For: 2.10


Currently we have two ways to prevent a partition from being evicted if it's no 
longer owner by affinity: 

1. "normal" reservation using GridDhtLocalPartition#reserve/release
2. "group" reservation using GridDhtPartitionsReservation.

The second is used only for SQL queries to ensure consistent result on topology 
change and adds a lot of complexity to SQL engine and partition eviction code. 
In fact, the same can be achieved using only first type of reservation.

I propose to get rid of group reservations using the following algorythm:

1. On PME all owning partitions are normally reserved.
2. A query counter for topology version is introduced.
3. If a query counter reaches zero for current topVer and where is a new topVer 
incompatible with current, previously reserved partitions are released.

Using such approach it's possible to totally remove any reservation management 
from SQL engine (except maintaining a counter), make it more simple and 
efficient.




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

Reply via email to