Content-Length: 271875 | pFad | http://github.com/postgrespro/postgres_cluster/commit/bfc9f9afe9e059882e31c7856cc717676b70a77e

B8 Fix 2pc timeout check · postgrespro/postgres_cluster@bfc9f9a · GitHub
Skip to content

Commit bfc9f9a

Browse files
committed
Fix 2pc timeout check
1 parent 5760d42 commit bfc9f9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,13 +836,13 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
836836
MtmUnlock();
837837
MtmResetTransaction(x);
838838
} else {
839-
time_t transTimeout = Max(Mtm2PCMinTimeout, (ts->csn - ts->snapshot)*Mtm2PCPrepareRatio/100000); /* usec->msec and percents */
839+
time_t transTimeout = Max(MSEC_TO_USEC(Mtm2PCMinTimeout), (ts->csn - ts->snapshot)*Mtm2PCPrepareRatio/100); /* usec->msec and percents */
840840
int result = 0;
841841
int nConfigChanges = Mtm->nConfigChanges;
842842

843843
timestamp_t start = MtmGetSystemTime();
844844
/* wait votes from all nodes */
845-
while (!ts->votingCompleted && start + transTimeout < MtmGetSystemTime())
845+
while (!ts->votingCompleted && start + transTimeout >= MtmGetSystemTime())
846846
{
847847
MtmUnlock();
848848
MtmWatchdog();

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/bfc9f9afe9e059882e31c7856cc717676b70a77e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy