gh-ost icon indicating copy to clipboard operation
gh-ost copied to clipboard

Tear down streamer

Open RainbowDashy opened this issue 2 years ago • 1 comments

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

RainbowDashy avatar Jul 20 '22 11:07 RainbowDashy

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?

RainbowDashy avatar Jul 28 '22 07:07 RainbowDashy