You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vyacheslav Koptilin (Jira)" <ji...@apache.org> on 2023/05/15 08:29:00 UTC

[jira] [Assigned] (IGNITE-19329) Tx. POSITIVE_INF inside SortedIndexLocker is not unique across partitions

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

Vyacheslav Koptilin reassigned IGNITE-19329:
--------------------------------------------

    Assignee: Vladislav Pyatkov

> Tx. POSITIVE_INF inside SortedIndexLocker is not unique across partitions
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-19329
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19329
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Konstantin Orlov
>            Assignee: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> POSITIVE_INF is a static constant using to take lock on positive infinite if no more key available in the cursor. The problem is that this value is not unique across different partitions, resulting in cross partition interference. Assume the following case:
> {code:java}
>         sql("CREATE TABLE test (id INT, aff_key INT, val INT, PRIMARY KEY (id, aff_key)) COLOCATE BY (aff_key) ");
>         sql("CREATE INDEX test_val_asc_idx ON test (val ASC)");
>         sql("INSERT INTO test VALUES (1, 1, 1), (2, 1, 2), (3, 1, 3)");
>         Transaction tx = CLUSTER_NODES.get(0).transactions().begin();
>         sql(tx, "SELECT * FROM test WHERE val <= 1 ORDER BY val");
>         sql("INSERT INTO test VALUES (4, 1, 4)"); // <-- this INSERT uses implicit transaction
> {code}
> Expected behaviour is that second insert completes without delays or errors, but {{LockException: IGN-TX-4 TraceId:cd2e7f6f-ca7b-47aa-9a42-9398517660f3 Failed to acquire a lock due to a conflict}} is thrown (according to current mode of deadlock prevention).



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