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

Commit faf90ea

Browse files
committed
Fix 'aborted on node #' error message
1 parent 1fdf868 commit faf90ea

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

arbiter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ static void MtmReceiver(Datum arg)
10781078
if (ts->status != TRANSACTION_STATUS_ABORTED) {
10791079
MTM_LOG1("Arbiter receive abort message for transaction %s (%llu) from node %d", ts->gid, (long64)ts->xid, node);
10801080
Assert(ts->status == TRANSACTION_STATUS_IN_PROGRESS);
1081-
ts->aborted_by_node = node;
1081+
ts->abortedByNode = node;
10821082
MtmAbortTransaction(ts);
10831083
}
10841084
if ((ts->participantsMask & ~Mtm->disabledNodeMask & ~ts->votedMask) == 0) {

multimaster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,7 @@ MtmCreateTransState(MtmCurrentTrans* x)
10331033
ts->isTwoPhase = x->isTwoPhase;
10341034
ts->isPinned = false;
10351035
ts->votingCompleted = false;
1036+
ts->abortedByNode = 0;
10361037
if (!found) {
10371038
ts->isEnqueued = false;
10381039
ts->isActive = false;
@@ -4552,7 +4553,7 @@ static bool MtmTwoPhaseCommit(MtmCurrentTrans* x)
45524553
Assert(ts);
45534554

45544555
FinishPreparedTransaction(x->gid, false);
4555-
MTM_ELOG(ERROR, "Transaction %s (%llu) is aborted on node %d. Check its log to see error details.", x->gid, (long64)x->xid, ts->aborted_by_node);
4556+
MTM_ELOG(ERROR, "Transaction %s (%llu) is aborted on node %d. Check its log to see error details.", x->gid, (long64)x->xid, ts->abortedByNode);
45564557
} else {
45574558
FinishPreparedTransaction(x->gid, true);
45584559
MTM_LOG2("Distributed transaction %s (%lld) is committed at %lld with LSN=%lld", x->gid, (long64)x->xid, MtmGetCurrentTime(), (long64)GetXLogInsertRecPtr());

multimaster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ typedef struct MtmTransState
269269
int nConfigChanges; /* Number of cluster configuration changes at moment of transaction start */
270270
nodemask_t participantsMask; /* Mask of nodes involved in transaction */
271271
nodemask_t votedMask; /* Mask of voted nodes */
272+
int abortedByNode; /* Store info about node on which this tx was aborted */
272273
TransactionId xids[1]; /* [Mtm->nAllNodes]: transaction ID at replicas */
273-
int aborted_by_node; /* Store info about node on which this tx was aborted */
274274
} MtmTransState;
275275

276276
typedef struct {

0 commit comments

Comments
 (0)