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

Commitfaf90ea

Browse files
committed
Fix 'aborted on node #' error message
1 parent1fdf868 commitfaf90ea

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
intnConfigChanges;/* Number of cluster configuration changes at moment of transaction start */
270270
nodemask_tparticipantsMask;/* Mask of nodes involved in transaction */
271271
nodemask_tvotedMask;/* Mask of voted nodes */
272+
intabortedByNode;/* Store info about node on which this tx was aborted */
272273
TransactionIdxids[1];/* [Mtm->nAllNodes]: transaction ID at replicas */
273-
intaborted_by_node;/* Store info about node on which this tx was aborted */
274274
}MtmTransState;
275275

276276
typedefstruct {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp