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

Commit3bc0f6f

Browse files
knizhnikkelvich
authored andcommitted
Fix issues with scram authorization
1 parent0b23cfa commit3bc0f6f

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

‎multimaster.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,38 +1111,31 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
11111111
MtmLock(LW_EXCLUSIVE);
11121112
ts= (MtmTransState*)hash_search(MtmXid2State,&x->xid,HASH_FIND,NULL);
11131113
Assert(ts!=NULL);
1114-
//if (x->gid[0]) MTM_LOG1("Preparing transaction %d (%s) at %ld", x->xid, x->gid, MtmGetCurrentTime());
11151114
if (!MtmIsCoordinator(ts)||Mtm->status==MTM_RECOVERY) {
1116-
MTM_TXTRACE(x,"recovery?");
11171115
MTM_LOG3("Preparing transaction %d (%s) at %ld",x->xid,x->gid,MtmGetCurrentTime());
11181116
Assert(x->gid[0]);
11191117
ts->votingCompleted= true;
1120-
MTM_TXTRACE(x,"recovery? 1");
11211118
if (Mtm->status!=MTM_RECOVERY/* || Mtm->recoverySlot != MtmReplicationNodeId*/) {
1122-
MTM_TXTRACE(x,"recovery? 2");
11231119
MtmSend2PCMessage(ts,MSG_PREPARED);/* send notification to coordinator */
11241120
if (!MtmUseDtm) {
11251121
ts->status=TRANSACTION_STATUS_UNKNOWN;
11261122
}
11271123
}else {
1128-
MTM_TXTRACE(x,"recovery? 3");
11291124
ts->status=TRANSACTION_STATUS_UNKNOWN;
11301125
}
1131-
MTM_TXTRACE(x,"recovery? 4");
11321126
MtmUnlock();
1133-
MTM_TXTRACE(x,"recovery? 5");
11341127
MtmResetTransaction();
1135-
MTM_TXTRACE(x,"recovery? 6");
1136-
}elseif (!ts->isLocal) {
1137-
MTM_TXTRACE(x,"not recovery?");
1138-
Mtm2PCVoting(x,ts);
1128+
}else {
1129+
if (!ts->isLocal) {
1130+
Mtm2PCVoting(x,ts);
1131+
}else {
1132+
ts->votingCompleted= true;
1133+
}
11391134
MtmUnlock();
11401135
if (x->isTwoPhase) {
11411136
MtmResetTransaction();
11421137
}
11431138
}
1144-
MTM_TXTRACE(x,"recovery? 7");
1145-
//if (x->gid[0]) MTM_LOG1("Prepared transaction %d (%s) csn=%ld at %ld: %d", x->xid, x->gid, ts->csn, MtmGetCurrentTime(), ts->status);
11461139
if (Mtm->inject2PCError==3) {
11471140
Mtm->inject2PCError=0;
11481141
elog(ERROR,"ERROR INJECTION for transaction %s (%lu)",x->gid, (long)x->xid);
@@ -1182,6 +1175,8 @@ MtmPreCommitPreparedTransaction(MtmCurrentTrans* x)
11821175
MtmLock(LW_EXCLUSIVE);
11831176

11841177
Mtm2PCVoting(x,ts);
1178+
}else {
1179+
ts->status=TRANSACTION_STATUS_UNKNOWN;
11851180
}
11861181

11871182
x->xid=ts->xid;

‎tests2/support/docker-regress.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ psql -U postgres regression <<-SQL
1111
SQL
1212

1313
./pg_regress --use-existing \
14-
--schedule=parallel_schedule \
14+
--schedule=serial_schedule \
1515
--host=node1 \
1616
--user=postgres
1717

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp