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

Roman Puchkovskiy updated IGNITE-21111:
---------------------------------------
    Description: 
The mechanism must enable the following:
 # Waiting for completion of all in-flight operations of RW transactions which 
(transactions) were started on schema versions before the index appearance
 # Fail all such operations after the index has switched to the BACKFILLING 
state

This can be achieved using an in-memory data structure with counters of active 
in-flight operations per Catalog Version and the 
MinAllowableRwTxCatalogVersionToStartOperation.

The following would be executed atomically wrt to each other:
 # Raising MinAllowableRwTxCatalogVersionToStartOperation when an index in the 
BACKFILLING state appears (it's raised to the version where the index has 
appered in the REGISTERED state)
 # Conditionally adding a new operation (with beginTs of its transaction and 
the Catalog version corresponding to the beginTs) to the structure (actually, 
increementing the corresponding counter) [the increment only happens if the 
operation Catalog version is still allowable wrt 
MinAllowableRwTxCatalogVersionToStartOperation; otherwise, failure is indicated 
by returning false)
 # Notifying a listener that no operations remain on Catalog versions lower 
than target version.

MinAllowableRwTxCatalogVersionToStartOperation must only grow monotonically.

  was:
The mechanism must enable the following:
 # Waiting for completion of all in-flight operations of RW transactions which 
(transactions) were started on schema versions before the index appearance
 # Fail all such operations after the index has switched to the BACKFILLING 
state

This can be achieved using an in-memory data structure with counters of active 
in-flight operations per Catalog Version and the 
MinAllowableCatalogVersionToStartOperation.

The following would be executed atomically wrt to each other:
 # Raising MinAllowableCatalogVersionToStartOperation when an index in the 
BACKFILLING state appears
 # Conditionally adding a new operation (with its operationTs and the 
corresponding Catalog version) to the structure (actually, increementing the 
corresponding counter) [the increment only happens if the operation Catalog 
version is still allowable wrt MinAllowableCatalogVersionToStartOperation; 
otherwise, failure is indicated by returning false)
 # Notifying a listener that no operations remain on Catalog versions lower 
than target version.


> Mechanism to wait for completion of in-flight operations of RW transactions 
> started before index appearance
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-21111
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21111
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> The mechanism must enable the following:
>  # Waiting for completion of all in-flight operations of RW transactions 
> which (transactions) were started on schema versions before the index 
> appearance
>  # Fail all such operations after the index has switched to the BACKFILLING 
> state
> This can be achieved using an in-memory data structure with counters of 
> active in-flight operations per Catalog Version and the 
> MinAllowableRwTxCatalogVersionToStartOperation.
> The following would be executed atomically wrt to each other:
>  # Raising MinAllowableRwTxCatalogVersionToStartOperation when an index in 
> the BACKFILLING state appears (it's raised to the version where the index has 
> appered in the REGISTERED state)
>  # Conditionally adding a new operation (with beginTs of its transaction and 
> the Catalog version corresponding to the beginTs) to the structure (actually, 
> increementing the corresponding counter) [the increment only happens if the 
> operation Catalog version is still allowable wrt 
> MinAllowableRwTxCatalogVersionToStartOperation; otherwise, failure is 
> indicated by returning false)
>  # Notifying a listener that no operations remain on Catalog versions lower 
> than target version.
> MinAllowableRwTxCatalogVersionToStartOperation must only grow monotonically.



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

Reply via email to