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

Commit0a5d843

Browse files
committed
mention node number in 'aborted by DTM' error message
1 parent8b8666e commit0a5d843

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

‎contrib/mmts/arbiter.c‎

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

‎contrib/mmts/multimaster.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4750,8 +4750,12 @@ static bool MtmTwoPhaseCommit(MtmCurrentTrans* x)
47504750
}else {
47514751
Assert(x->isActive);
47524752
if (x->status==TRANSACTION_STATUS_ABORTED) {
4753+
MtmTransState*ts;
4754+
ts= (MtmTransState*)hash_search(MtmXid2State,&(x->xid),HASH_FIND,NULL);
4755+
Assert(ts);
4756+
47534757
FinishPreparedTransaction(x->gid, false);
4754-
MTM_ELOG(ERROR,"Transaction %s (%llu) is aborted onneighbournode. Checkneighbour nodeslog to see error details.",x->gid, (long64)x->xid);
4758+
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);
47554759
}else {
47564760
FinishPreparedTransaction(x->gid, true);
47574761
MTM_LOG2("Distributed transaction %s (%lld) is committed at %lld with LSN=%lld",x->gid, (long64)x->xid,MtmGetCurrentTime(), (long64)GetXLogInsertRecPtr());

‎contrib/mmts/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