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

Commit9b1ae2b

Browse files
knizhnikkelvich
authored andcommitted
Reset latch
1 parent02789a0 commit9b1ae2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎arbiter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,9 @@ static void MtmTransReceiver(Datum arg)
776776
}
777777
break;
778778
caseMSG_PREPARED:
779+
Assert(ts->nVotes<Mtm->nLiveNodes);
779780
if (ts->status!=TRANSACTION_STATUS_ABORTED) {
780781
Assert(ts->status==TRANSACTION_STATUS_IN_PROGRESS);
781-
Assert(ts->nVotes<Mtm->nLiveNodes);
782782
if (msg->csn>ts->csn) {
783783
ts->csn=msg->csn;
784784
MtmSyncClock(ts->csn);

‎multimaster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,13 +803,13 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
803803
MtmUnlock();
804804
MtmWatchdog();
805805
result=WaitLatch(&MyProc->procLatch,WL_LATCH_SET|WL_TIMEOUT,timeout);
806-
if (result&WL_TIMEOUT) {
806+
if (result&WL_LATCH_SET) {
807+
ResetLatch(&MyProc->procLatch);
808+
}elseif (result&WL_TIMEOUT) {
807809
if (MtmGetSystemTime()>deadline) {
808810
MtmLock(LW_SHARED);
809811
break;
810812
}
811-
}else {
812-
ResetLatch(&MyProc->procLatch);
813813
}
814814
MtmLock(LW_SHARED);
815815
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp