Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b0920e3

Browse files
committed
do not hold lock in PollStatusOfPrepared while avaiting backends to error out current tx
1 parent 6c4f698 commit b0920e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

multimaster.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,14 @@ MtmPollStatusOfPreparedTransactions(bool majorMode)
20582058
MtmL2List *start = Mtm->activeTransList.next;
20592059
MtmL2List *cur;
20602060

2061+
/*
2062+
* Backends check cluster config changes every MtmHeartbeatSendTimeout ms,
2063+
* so we need here to wait slightly more time to allow them to detect error
2064+
* and set votingCompleted flag.
2065+
*/
2066+
MtmUnlock();
20612067
MtmSleep(2*MtmHeartbeatSendTimeout*1000);
2068+
MtmLock(LW_EXCLUSIVE);
20622069

20632070
for (cur = start; cur->next != start; cur = cur->next)
20642071
{

0 commit comments

Comments
 (0)