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

Denis Chudov updated IGNITE-23159:
----------------------------------
    Summary: Fix broken serializability of transactions on tables having 
secondary indexes  (was: Fix broken serializability)

> Fix broken serializability of transactions on tables having secondary indexes
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-23159
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23159
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexey Scherbakov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0
>
>
> Let's assume a table:
> {noformat}
> Goods:
> id int primary key
> name: varchar
> category: varchar, indexed with non-unique index
> {noformat}
> and the following scenario, where two transaction are executed concurrently 
> on nodes A and B, and primary keys 1 and 2 will be located on these nodes 
> respectively:
> A: tx1: insert (1, Apple, Fruits); // takes IX lock
> B: tx2: scan(Fruits) // found nothing, locks nothing
> B: tx1: insert(2, Peach, Fruits); // takes IX lock
> A: tx2: scan(Fruits) // waits for IX lock release to take S lock
> tx1:commit
> A: tx2: unlocked and reads Apple by index and finished
> Serializability is broken, because tx2 didn't see Peach and was ordered 
> later, but did see Apple.
> This needs to be fixed by taking index locks both on nodes A and B (actually 
> on all primary replicas).
> This will have big performance impact, until is addressed by implementing 
> separate distribution zones for indexes (requires a design).
> The same issue is applied to sorted indexes.



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

Reply via email to