Young-Seok Kim has posted comments on this change. Change subject: Deadlock-free locking protocol is enabled ......................................................................
Patch Set 4: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/825/4/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/LockThenSearchOperationCallback.java File asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/LockThenSearchOperationCallback.java: Line 37: public class LockThenSearchOperationCallback extends AbstractOperationCallback implements ISearchOperationCallback { > 1. Why does this class implement ISearchOperationCallback instead of IModif First of all, as you mentioned, this change is orthogonal to your question. Regardless of that, here, implementing search callback seems right to me since the callback is used during search operation before actual upsert is performed. We don't want to acquire S-lock during search and then upgrade/convert the lock from S-lock to X-lock during upsert( which may introduce deadlock even for the record-level transaction) So, in that sense, it is a natural choice to implement the search callback interface here. Also, the lock in the search callback doesn't have to be S-lock and the contract specified in the search callback interface doesn't say anything about the lock type. So, IMO, this shouldn't be an issue to be filed in the JIRA. -- To view, visit https://asterix-gerrit.ics.uci.edu/825 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie58ae2f519baa53599e99b51bd61ea5f8366dafd Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Young-Seok Kim <kiss...@gmail.com> Gerrit-Reviewer: Ian Maxon <ima...@apache.org> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Murtadha Hubail <hubail...@gmail.com> Gerrit-Reviewer: Till Westmann <ti...@apache.org> Gerrit-Reviewer: Yingyi Bu <buyin...@gmail.com> Gerrit-Reviewer: Young-Seok Kim <kiss...@gmail.com> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com> Gerrit-HasComments: Yes