gh-ost
gh-ost copied to clipboard
Tear down streamer
Related issue: https://github.com/github/gh-ost/issues/465
Description
The PR https://github.com/github/gh-ost/pull/479 introduces "teardown" and make it possible to use gh-ost as a library. However some cleanups are missing.
This PR closes streamer properly when tearing down.
Downstream PR is https://github.com/bytebase/gh-ost/pull/3
After a second thought, I believe that we shouldn’t reuse the CutOverCompleteFlag
here, which would stop streaming via canStopStreaming()
but to test migrator.finishedMigrating
in canStopStreaming()
instead. This is more consistent with the existing patterns present in applier
, for example.
@timvaillancourt wdyt?