This commit is contained in:
p0ny 2023-05-27 19:12:14 +00:00 committed by GitHub
commit 89f390406d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import (
"fmt"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/github/gh-ost/go/base"
@ -215,5 +216,8 @@ func (this *EventsStreamer) Close() (err error) {
}
func (this *EventsStreamer) Teardown() {
this.migrationContext.Log.Debugf("Tearing down...")
this.db.Close()
this.Close()
atomic.StoreInt64(&this.migrationContext.CutOverCompleteFlag, 1)
}