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

Commit883d363

Browse files
committed
Reset latch
1 parent3a8bfdd commit883d363

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎contrib/mmts/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);

‎contrib/mmts/multimaster.c‎

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp