@@ -148,7 +148,7 @@ static void MMExecutorFinish(QueryDesc *queryDesc);
148
148
static bool MMIsDistributedTrans ;
149
149
150
150
static BackgroundWorker DtmWorker = {
151
- "DtmWorker " ,
151
+ "sockhub " ,
152
152
0 , /* do not need connection to the database */
153
153
BgWorkerStart_PostmasterStart ,
154
154
1 , /* restrart in one second (is it possible to restort immediately?) */
@@ -656,13 +656,15 @@ static void DtmSetTransactionStatus(TransactionId xid, int nsubxids, Transaction
656
656
}
657
657
else
658
658
{
659
+ XidStatus verdict ;
659
660
XTM_INFO ("Begin commit transaction %d\n" , xid );
660
661
/* Mark transaction as in-doubt in xid_in_doubt hash table */
661
662
LWLockAcquire (dtm -> hashLock , LW_EXCLUSIVE );
662
663
hash_search (xid_in_doubt , & DtmNextXid , HASH_ENTER , NULL );
663
664
LWLockRelease (dtm -> hashLock );
664
- if (DtmGlobalSetTransStatus (xid , status , true) != status ) {
665
- XTM_INFO ("Commit of transaction %d is rejected by arbiter\n" , xid );
665
+ verdict = DtmGlobalSetTransStatus (xid , status , true);
666
+ if (verdict != status ) {
667
+ XTM_INFO ("Commit of transaction %d is rejected by arbiter: staus=%d\n" , xid , verdict );
666
668
DtmNextXid = InvalidTransactionId ;
667
669
DtmLastSnapshot = NULL ;
668
670
MMIsDistributedTrans = false;
0 commit comments