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

Commitc416fb5

Browse files
committed
mention node number in 'aborted by DTM' error message
1 parent3552597 commitc416fb5

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

‎arbiter.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ static void MtmReceiver(Datum arg)
10771077
if (ts->status!=TRANSACTION_STATUS_ABORTED) {
10781078
MTM_LOG1("Arbiter receive abort message for transaction %s (%llu) from node %d",ts->gid, (long64)ts->xid,node);
10791079
Assert(ts->status==TRANSACTION_STATUS_IN_PROGRESS);
1080+
ts->aborted_by_node=node;
10801081
MtmAbortTransaction(ts);
10811082
}
10821083
if ((ts->participantsMask& ~Mtm->disabledNodeMask& ~ts->votedMask)==0) {

‎multimaster.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4764,8 +4764,12 @@ static bool MtmTwoPhaseCommit(MtmCurrentTrans* x)
47644764
}else {
47654765
Assert(x->isActive);
47664766
if (x->status==TRANSACTION_STATUS_ABORTED) {
4767+
MtmTransState*ts;
4768+
ts= (MtmTransState*)hash_search(MtmXid2State,&(x->xid),HASH_FIND,NULL);
4769+
Assert(ts);
4770+
47674771
FinishPreparedTransaction(x->gid, false);
4768-
MTM_ELOG(ERROR,"Transaction %s (%llu) is aborted onneighbournode. Checkneighbour nodeslog to see error details.",x->gid, (long64)x->xid);
4772+
MTM_ELOG(ERROR,"Transaction %s (%llu) is aborted on node %d. Checkitslog to see error details.",x->gid, (long64)x->xid,ts->aborted_by_node);
47694773
}else {
47704774
FinishPreparedTransaction(x->gid, true);
47714775
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ typedef struct MtmTransState
267267
nodemask_tparticipantsMask;/* Mask of nodes involved in transaction */
268268
nodemask_tvotedMask;/* Mask of voted nodes */
269269
TransactionIdxids[1];/* [Mtm->nAllNodes]: transaction ID at replicas */
270+
intaborted_by_node;/* Store info about node on which this tx was aborted */
270271
}MtmTransState;
271272

272273
typedefstruct {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp