You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
insert into accounts (select2*generate_series(1,100), 0); -- node2, even user_id's
51
55
select dtm_begin_transaction(); -- node1, returns global xid, e.g. 42
52
56
select dtm_join_transaction(42); -- node2, join global tx
53
57
begin; -- node1
54
58
begin; -- node2
55
59
update accounts set amount=amount-100where user_id=1; -- node1, transfer money from user#1
56
60
update accounts set amount=amount+100where user_id=2; -- node2, to user#2
57
-
commit; -- node1
61
+
commit; -- node1, blocks until second commit happend
58
62
commit; -- node2
59
63
```
60
64
@@ -63,7 +67,7 @@ commit; -- node1
63
67
To ensure consistency we use simple bank test: perform a lot of simultaneous transfers between accounts on different servers, while constantly checking total amount of money on all accounts. This test can be found in tests/perf.
64
68
65
69
```bash
66
-
> go run ./perf/*
70
+
> go run ./tests/perf/*
67
71
-C value
68
72
Connection string (repeat for multiple connections)
69
73
-a int
@@ -87,14 +91,14 @@ To ensure consistency we use simple bank test: perform a lot of simultaneous tra
0 commit comments