Skip to content

Commit f96d97b

Browse files
committed
Check update status in xcheck
1 parent d5fecb5 commit f96d97b

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

contrib/mmts/multimaster.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ MtmAdjustOldestXid(TransactionId xid)
512512
MTM_LOG2("%d: MtmAdjustOldestXid(%d): snapshot=%ld, csn=%ld, status=%d", MyProcPid, xid, ts != NULL ? ts->snapshot : 0, ts != NULL ? ts->csn : 0, ts != NULL ? ts->status : -1);
513513
Mtm->gcCount = 0;
514514

515-
//return FirstNormalTransactionId;
516-
517515
if (ts != NULL) {
518516
oldestSnapshot = ts->snapshot;
519517
Assert(oldestSnapshot != INVALID_CSN);

contrib/mmts/t/001_basic_recovery.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
diag("starting node 2");
7272
$cluster->{nodes}->[2]->start;
7373

74+
sleep(5); # Wait until node is started
75+
7476
diag("inserting 6 on node 1 (can fail)");
7577
$cluster->psql(0, 'postgres', "insert into t values(6, 60);");
7678
diag("inserting 7 on node 2 (can fail)");

contrib/mmts/tests2/client2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ def transfer_tx(self, conn, cur, agg):
139139
set amount = amount - %s
140140
where uid = %s''',
141141
(amount, from_uid))
142+
assert(cur.rowcount == 1)
142143
yield from cur.execute('''update bank_test
143144
set amount = amount + %s
144145
where uid = %s''',
145146
(amount, to_uid))
147+
assert(cur.rowcount == 1)
146148
yield from cur.execute('commit')
147149

148150
@asyncio.coroutine

contrib/mmts/tests2/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if [ "$1" = 'postgres' ]; then
8888
multimaster.conn_strings = '$CONNSTRS'
8989
multimaster.heartbeat_recv_timeout = 1000
9090
multimaster.heartbeat_send_timeout = 250
91-
multimaster.twopc_min_timeout = 5000
91+
multimaster.twopc_min_timeout = 2000
9292
EOF
9393

9494
tail -n 20 $PGDATA/postgresql.conf

contrib/mmts/tests2/test_recovery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_node_partition(self):
4848
self.assertTrue( aggs['transfer_0']['finish']['commit'] > 0 )
4949
self.assertTrue( aggs['transfer_1']['finish']['commit'] > 0 )
5050
# self.assertTrue( aggs['transfer_2']['finish']['commit'] == 0 )
51+
self.assertTrue( aggs['sumtotal_0']['isolation'] + aggs['sumtotal_1']['isolation'] + aggs['sumtotal_2']['isolation'] == 0 )
5152

5253
subprocess.check_call(['blockade','join'])
5354
print('### deblockade node3 ###')
@@ -60,6 +61,7 @@ def test_node_partition(self):
6061
time.sleep(3)
6162
aggs = self.client.get_status()
6263
MtmClient.print_aggregates(aggs)
64+
self.assertTrue( aggs['sumtotal_0']['isolation'] + aggs['sumtotal_1']['isolation'] + aggs['sumtotal_2']['isolation'] == 0 )
6365

6466
# check that during last aggregation all nodes were working
6567
self.assertTrue( aggs['transfer_0']['finish']['commit'] > 0 )

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy