You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexey Scherbakov (Jira)" <ji...@apache.org> on 2020/09/02 09:08:00 UTC

[jira] [Updated] (IGNITE-13395) Get rid of partition group reservations.

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

Alexey Scherbakov updated IGNITE-13395:
---------------------------------------
    Description: 
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, used as an optimization for reserving batches of partitions at once.

The second is used only for SQL queries to ensure consistent result on unstable topology 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.


  was:
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, used as an optimization for reserving batches of partitions at once.

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.



> 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
>            Priority: Major
>             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, used as an optimization for reserving batches of partitions at once.
> The second is used only for SQL queries to ensure consistent result on unstable topology 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)