Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit917d875

Browse files
knizhnikkelvich
authored andcommitted
Check update status in xcheck
1 parent7a50383 commit917d875

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
yieldfromcur.execute('''update bank_test
154155
set amount = amount + %s
155156
where uid = %s''',
156157
(amount,to_uid))
158+
assert(cur.rowcount==1)
157159
yieldfromcur.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)

[8]ページ先頭

©2009-2025 Movatter.jp