Skip to content

Commit 917d875

Browse files
knizhnikkelvich
authored andcommitted
Check update status in xcheck
1 parent 7a50383 commit 917d875

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

multimaster.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,6 @@ MtmAdjustOldestXid(TransactionId xid)
517517
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);
518518
Mtm->gcCount = 0;
519519

520-
//return FirstNormalTransactionId;
521-
522520
if (ts != NULL) {
523521
oldestSnapshot = ts->snapshot;
524522
Assert(oldestSnapshot != INVALID_CSN);

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)");

tests2/client2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,12 @@ def transfer_tx(self, conn, cur, agg):
150150
set amount = amount - %s
151151
where uid = %s''',
152152
(amount, from_uid))
153+
assert(cur.rowcount == 1)
153154
yield from cur.execute('''update bank_test
154155
set amount = amount + %s
155156
where uid = %s''',
156157
(amount, to_uid))
158+
assert(cur.rowcount == 1)
157159
yield from cur.execute('commit')
158160

159161
@asyncio.coroutine

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

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