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

Commit 13d2f71

Browse files
knizhnikkelvich
authored andcommitted
Introduce delay after creation of concurrent index
1 parent 252dd43 commit 13d2f71

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
@@ -4049,6 +4049,13 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
40494049
MtmProcessDDLCommand(queryString, false, true);
40504050
MtmTx.isDistributed = false;
40514051
skipCommand = true;
4052+
/*
4053+
* Index is created at replicas completely asynchronously, so to prevent unintended interleaving with subsequent
4054+
* commands in this session, just wait here for a while.
4055+
* It will help to pass regression tests but will not be enough for construction of real large indexes
4056+
* where difference between completion of this operation at different nodes is unlimited
4057+
*/
4058+
MtmSleep(USECS_PER_SEC);
40524059
} else if (MtmApplyContext != NULL) {
40534060
MemoryContext oldContext = MemoryContextSwitchTo(MtmApplyContext);
40544061
Assert(oldContext != MtmApplyContext);

0 commit comments

Comments
 (0)