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/09/19 14:36:00 UTC

[jira] [Resolved] (ASTERIXDB-2522) Skip logging WAIT record during lock conflicts

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

Chen Luo resolved ASTERIXDB-2522.
---------------------------------
    Resolution: Implemented

> Skip logging WAIT record during lock conflicts
> ----------------------------------------------
>
>                 Key: ASTERIXDB-2522
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2522
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>          Components: TX - Transactions
>            Reporter: Chen Luo
>            Assignee: Chen Luo
>            Priority: Minor
>
> Currently, our deadlock-free locking protocol (https://cwiki.apache.org/confluence/display/ASTERIXDB/Deadlock-Free+Locking+Protocol) is conservative. It works as follows:
> A writer thread (i.e., transactor) first tries to acquire X lock on a primary key.
> If the try lock fails, it should release all previous held locks before acquiring the X lock. To release previous locks, the transactor pushes partial frames so that previous records can be committed, and further log a WAIT record to wait for the log flusher to force all previous log records and unlock previous locks.
> However, the WAIT record is actually not necessary. After committing previous records, the locks will eventually be released by the log flusher thread. As a result, deadlock still cannot happen in this case.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)