Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5c26b9d

Browse files
knizhnikkelvich
authored andcommitted
Minor refactoring
1 parent a8f07d2 commit 5c26b9d

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
static void MtmWakeUpBackend(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
int nSubxids; /* Number of subtransanctions */
8686
struct MtmTransState* nextVoting; /* Next element in L1-list of voting transactions. */
8787
struct MtmTransState* next; /* Next element in L1 list of all finished transaction present in xid2state hash */
88-
bool done;
88+
bool voteCompleted; /* Responses necessary to make a decision are received by coordinator of transaction */
8989
TransactionId xids[1]; /* transaction ID at replicas: varying size MtmNodes */
9090
} MtmTransState;
9191

0 commit comments

Comments
 (0)