@@ -937,18 +937,18 @@ func (this *Applier) CreateAtomicCutOverSentryTable() error {
937
937
return nil
938
938
}
939
939
940
- // InitAtomicCutOverIdleTimeout sets the cut-over session wait_timeout in order to reduce the
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
- func (this * Applier ) InitAtomicCutOverIdleTimeout (tx * gosql.Tx ) error {
943
- cutOverIdleTimeoutSeconds := this .migrationContext .CutOverLockTimeoutSeconds * 2
944
- this .migrationContext .Log .Infof ("Setting cut-over idle timeout as %d seconds" , cutOverIdleTimeoutSeconds )
945
- query := fmt .Sprintf (`set /* gh-ost */ session wait_timeout:=%d` , cutOverIdleTimeoutSeconds )
942
+ func (this * Applier ) InitAtomicCutOverWaitTimeout (tx * gosql.Tx ) error {
943
+ cutOverWaitTimeoutSeconds := this .migrationContext .CutOverLockTimeoutSeconds * 2
944
+ this .migrationContext .Log .Infof ("Setting cut-over idle timeout as %d seconds" , cutOverWaitTimeoutSeconds )
945
+ query := fmt .Sprintf (`set /* gh-ost */ session wait_timeout:=%d` , cutOverWaitTimeoutSeconds )
946
946
_ , err := tx .Exec (query )
947
947
return err
948
948
}
949
949
950
- // RevertAtomicCutOverIdleTimeout restores the original wait_timeout for the applier session post-cut-over.
951
- func (this * Applier ) RevertAtomicCutOverIdleTimeout () {
950
+ // RevertAtomicCutOverWaitTimeout restores the original wait_timeout for the applier session post-cut-over.
951
+ func (this * Applier ) RevertAtomicCutOverWaitTimeout () {
952
952
this .migrationContext .Log .Infof ("Reverting cut-over idle timeout to %d seconds" , this .migrationContext .ApplierWaitTimeout )
953
953
query := fmt .Sprintf (`set /* gh-ost */ session wait_timeout:=%d` , this .migrationContext .ApplierWaitTimeout )
954
954
if _ , err := sqlutils .ExecNoPrepare (this .db , query ); err != nil {
@@ -998,11 +998,11 @@ func (this *Applier) AtomicCutOverMagicLock(sessionIdChan chan int64, tableLocke
998
998
return err
999
999
}
1000
1000
1001
- if err := this .InitAtomicCutOverIdleTimeout (tx ); err != nil {
1001
+ if err := this .InitAtomicCutOverWaitTimeout (tx ); err != nil {
1002
1002
tableLocked <- err
1003
1003
return err
1004
1004
}
1005
- defer this .RevertAtomicCutOverIdleTimeout ()
1005
+ defer this .RevertAtomicCutOverWaitTimeout ()
1006
1006
1007
1007
if err := this .CreateAtomicCutOverSentryTable (); err != nil {
1008
1008
tableLocked <- err
0 commit comments