Chen Luo created ASTERIXDB-2522:
-----------------------------------

             Summary: 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


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
(v7.6.3#76005)

Reply via email to