@@ -148,7 +148,7 @@ static void MMExecutorFinish(QueryDesc *queryDesc);
148148static bool MMIsDistributedTrans ;
149149
150150static BackgroundWorker DtmWorker = {
151- "DtmWorker " ,
151+ "sockhub " ,
152152 0 , /* do not need connection to the database */
153153 BgWorkerStart_PostmasterStart ,
154154 1 , /* restrart in one second (is it possible to restort immediately?) */
@@ -656,13 +656,15 @@ static void DtmSetTransactionStatus(TransactionId xid, int nsubxids, Transaction
656656 }
657657 else
658658 {
659+ XidStatus verdict ;
659660 XTM_INFO ("Begin commit transaction %d\n" , xid );
660661 /* Mark transaction as in-doubt in xid_in_doubt hash table */
661662 LWLockAcquire (dtm -> hashLock , LW_EXCLUSIVE );
662663 hash_search (xid_in_doubt , & DtmNextXid , HASH_ENTER , NULL );
663664 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 );
666668 DtmNextXid = InvalidTransactionId ;
667669 DtmLastSnapshot = NULL ;
668670 MMIsDistributedTrans = false;
0 commit comments