trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Ming (Ming)" <ming....@esgyn.cn>
Subject re: Question about commit conflict check
Date Wed, 16 Sep 2015 13:35:27 GMT
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.li@huawei.com] 
发送时间: 2015年9月16日 18:35
收件人: dev <dev@trafodion.incubator.apache.org>
抄送: Nieyuanyuan <nieyuanyuan@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.
Mime
View raw message