You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Chen Luo (JIRA)" <ji...@apache.org> on 2019/04/07 15:52:00 UTC

[jira] [Closed] (ASTERIXDB-2542) Insert duplicate check is not atomic

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

Chen Luo closed ASTERIXDB-2542.
-------------------------------
    Resolution: Not A Problem

The conflict is resolved when writers insert into the (same) memory component.

> Insert duplicate check is not atomic
> ------------------------------------
>
>                 Key: ASTERIXDB-2542
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2542
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>          Components: STO - Storage, TX - Transactions
>            Reporter: Chen Luo
>            Assignee: Chen Luo
>            Priority: Major
>
> To insert a record into the primary index, the primary index will first search itself and only perform the insertion if the old record does not exist. However, the index search operation and the insertion operation are not atomic because index search does not lock the primary key; it is possible that two writers that insert records with the same key can both pass the uniqueness test and insert the record twice.
> We should lock the primary key during index search, as we did for doing upsert.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)