Hi,

Please don't ask question to specific people, otherwise, others will ignore 
your question :-)
Each row can only belong to one region. Check conflict in region not TM.

Thanks,
Ming

-----邮件原件-----
发件人: Lijian (Q) [mailto:jianli...@huawei.com] 
发送时间: 2015年9月16日 18:35
收件人: dev <dev@trafodion.incubator.apache.org>
抄送: Nieyuanyuan <nieyuany...@huawei.com>
主题: Question about commit conflict check

Hi, Hans, Narendra,

       I’m reading source code of trafodion’s DTM and get confused about commit 
conflict check.

       When a transaction want to commit, it need to check update conflict 
first. If there’s update row conflict with other running transactions that 
started before the commit time, the transaction will abort.
This work is done by TrxTransactionState.hasconflict, and all the running 
transactions get from the set transactionsToCheck in TrxTransactionState.java。

My question is how we can get all running transactions when transactions may be 
execute in different node? To my opinion, the transactionsToCheck just include 
the running transactions in one node, not all nodes.

For Example:
tx1 run on node1 and tx1 update a row in region1.
tx2 run on node2 and tx2 update the same row in region1.
tx1 commit first.
tx2 want  to commit, and he check row conflict and get running transactions 
from set transactionsToCheck, but tx1 is not in the set transactionsToCheck in 
node1’s TM, It’s in the set transactionsToCheck in node2’s TM. How can tx2 get 
the row conflict?


Thanks.

Reply via email to