How to check if vitess 2PC work

33 views
Skip to first unread message

pickup li

unread,
Mar 15, 2019, 6:27:00 AM3/15/19
to vitess
I am testing the cross-shard transaction of vitess. Is  there any way to simulate the 2PC cross-shard transaction situation: both nodes are prepared successfully, but  one shard of transaction commit fails. According to vitess mode, the other shard will try the transaction after recovery. But How can I simulate commit fail after prepare successfully.

Sugu Sougoumarane

unread,
Mar 19, 2019, 9:58:00 AM3/19/19
to vit...@googlegroups.com
It's very difficult to predictably reproduce this because it's hard to catch a 2PC in the middle of its action. But you can probably reproduce it through load testing where you continuously perform 2PC transactions and then bring down the vttablets or mysqls randomly.
The other option is to test individual parts through unit tests. I have some here: https://github.com/vitessio/vitess/blob/master/go/vt/vttablet/endtoend/transaction_test.go.

On Fri, Mar 15, 2019 at 3:27 AM pickup li <pick...@gmail.com> wrote:
I am testing the cross-shard transaction of vitess. Is  there any way to simulate the 2PC cross-shard transaction situation: both nodes are prepared successfully, but  one shard of transaction commit fails. According to vitess mode, the other shard will try the transaction after recovery. But How can I simulate commit fail after prepare successfully.

--
You received this message because you are subscribed to the Google Groups "vitess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vitess+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pickup li

unread,
Mar 25, 2019, 7:16:13 AM3/25/19
to vitess
Thanks very much for the reply. I will check the test case and try to monitor it. 

在 2019年3月19日星期二 UTC+8下午9:58:00,Sugu Sougoumarane写道:
Reply all
Reply to author
Forward
0 new messages