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

Commit5c26b9d

Browse files
knizhnikkelvich
authored andcommitted
Minor refactoring
1 parenta8f07d2 commit5c26b9d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎arbiter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ static void MtmTransSender(Datum arg)
529529

530530
staticvoidMtmWakeUpBackend(MtmTransState*ts)
531531
{
532-
ts->done= true;
532+
ts->voteCompleted= true;
533533
SetLatch(&ProcGlobal->allProcs[ts->procno].procLatch);
534534
}
535535

‎multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ static void MtmPrecommitTransaction(MtmCurrentTrans* x)
629629
ts->cmd=MSG_INVALID;
630630
ts->procno=MyProc->pgprocno;
631631
ts->nVotes=0;
632-
ts->done= false;
632+
ts->voteCompleted= false;
633633
dtm->transCount+=1;
634634

635635
if (TransactionIdIsValid(x->gtid.xid)) {
@@ -1638,7 +1638,7 @@ MtmVoteForTransaction(MtmTransState* ts)
16381638
}
16391639
}
16401640
MTM_TRACE("%d: Node %d waiting latch...\n",MyProcPid,MtmNodeId);
1641-
while (!ts->done) {
1641+
while (!ts->voteCompleted) {
16421642
MtmUnlock();
16431643
WaitLatch(&MyProc->procLatch,WL_LATCH_SET,-1);
16441644
ResetLatch(&MyProc->procLatch);

‎multimaster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ typedef struct MtmTransState
8585
intnSubxids;/* Number of subtransanctions */
8686
structMtmTransState*nextVoting;/* Next element in L1-list of voting transactions. */
8787
structMtmTransState*next;/* Next element in L1 list of all finished transaction present in xid2state hash */
88-
booldone;
88+
boolvoteCompleted;/* Responses necessary to make a decision are received by coordinator of transaction */
8989
TransactionIdxids[1];/* transaction ID at replicas: varying size MtmNodes */
9090
}MtmTransState;
9191

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp