File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -940,7 +940,7 @@ func (this *Applier) CreateAtomicCutOverSentryTable() error {
940
940
// InitAtomicCutOverWaitTimeout sets the cut-over session wait_timeout in order to reduce the
941
941
// time an unresponsive (but still connected) gh-ost process can hold the cut-over lock.
942
942
func (this * Applier ) InitAtomicCutOverWaitTimeout (tx * gosql.Tx ) error {
943
- cutOverWaitTimeoutSeconds := this .migrationContext .CutOverLockTimeoutSeconds * 2
943
+ cutOverWaitTimeoutSeconds := this .migrationContext .CutOverLockTimeoutSeconds * 3
944
944
this .migrationContext .Log .Infof ("Setting cut-over idle timeout as %d seconds" , cutOverWaitTimeoutSeconds )
945
945
query := fmt .Sprintf (`set /* gh-ost */ session wait_timeout:=%d` , cutOverWaitTimeoutSeconds )
946
946
_ , err := tx .Exec (query )
@@ -998,16 +998,16 @@ func (this *Applier) AtomicCutOverMagicLock(sessionIdChan chan int64, tableLocke
998
998
return err
999
999
}
1000
1000
1001
- if err := this .InitAtomicCutOverWaitTimeout ( tx ); err != nil {
1001
+ if err := this .CreateAtomicCutOverSentryTable ( ); err != nil {
1002
1002
tableLocked <- err
1003
1003
return err
1004
1004
}
1005
- defer this .RevertAtomicCutOverWaitTimeout ()
1006
1005
1007
- if err := this .CreateAtomicCutOverSentryTable ( ); err != nil {
1006
+ if err := this .InitAtomicCutOverWaitTimeout ( tx ); err != nil {
1008
1007
tableLocked <- err
1009
1008
return err
1010
1009
}
1010
+ defer this .RevertAtomicCutOverWaitTimeout ()
1011
1011
1012
1012
query = fmt .Sprintf (`lock /* gh-ost */ tables %s.%s write, %s.%s write` ,
1013
1013
sql .EscapeName (this .migrationContext .DatabaseName ),
You can’t perform that action at this time.
0 commit comments