Skip to content

Commit b978360

Browse files
knizhnikkelvich
authored andcommitted
rename sockhub worker
1 parent fcd6771 commit b978360

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

contrib/multimaster/multimaster.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static void MMExecutorFinish(QueryDesc *queryDesc);
148148
static bool MMIsDistributedTrans;
149149

150150
static 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;

contrib/multimaster/tests/run-pgbench.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)