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

Vladislav Pyatkov updated IGNITE-18165:
---------------------------------------
    Description: 
*Motivation:*
Transaction isolation requires using short term locks in insert operation over 
sorted indexes. It was not implemented because short term locks had not 
supported.
According to the transaction protocol IEP [1] insert operation in RW 
transactions for sortex index looks as follows:

Unique index:
// insert
IX_short(nextKey) // released after the insertion
X_commit(currentKey) // acquired before releasing IX_short

Non-unique index:
// insert
IX_short(nextKey)
X_commit(currentKey) if nextKey previously locked in S, X or SIX mode
IX_commit(currentKey) otherwise

*Implementation notes:*
For the code related to locks for indexes, see 
org.apache.ignite.internal.table.distributed.IndexLocker. We are interested in 
SortedIndexLocker implementation, method locksForInsert. Actually, there is 
some draft, but it is commented.

[1] 
https://cwiki.apache.org/confluence/display/IGNITE/IEP-91%3A+Transaction+protocol

  was:
*Motivation:*
Transaction isolation requires using short term locks in insert operation over 
sorted indexes. It was not implemented because short term locks had not 
supported.

*Implementation notes:*
According to the transaction protocol IEP [1] insert operation in RW 
transactions for sortex index looks as follows:

Unique index:
// insert
IX_short(nextKey) // released after the insertion
X_commit(currentKey) // acquired before releasing IX_short

Non-unique index:
// insert
IX_short(nextKey)
X_commit(currentKey) if nextKey previously locked in S, X or SIX mode
IX_commit(currentKey) otherwise

[1] 
https://cwiki.apache.org/confluence/display/IGNITE/IEP-91%3A+Transaction+protocol


> Apply short term loks to sorted indexes
> ---------------------------------------
>
>                 Key: IGNITE-18165
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18165
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>
> *Motivation:*
> Transaction isolation requires using short term locks in insert operation 
> over sorted indexes. It was not implemented because short term locks had not 
> supported.
> According to the transaction protocol IEP [1] insert operation in RW 
> transactions for sortex index looks as follows:
> Unique index:
> // insert
> IX_short(nextKey) // released after the insertion
> X_commit(currentKey) // acquired before releasing IX_short
> Non-unique index:
> // insert
> IX_short(nextKey)
> X_commit(currentKey) if nextKey previously locked in S, X or SIX mode
> IX_commit(currentKey) otherwise
> *Implementation notes:*
> For the code related to locks for indexes, see 
> org.apache.ignite.internal.table.distributed.IndexLocker. We are interested 
> in SortedIndexLocker implementation, method locksForInsert. Actually, there 
> is some draft, but it is commented.
> [1] 
> https://cwiki.apache.org/confluence/display/IGNITE/IEP-91%3A+Transaction+protocol



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

Reply via email to