Skip to content

Stopping infinite goroutines #465

@nikhilmat

Description

@nikhilmat

Hey all!

Thanks for building such an awesome library!

We're getting ready to start using this as a part of our production workflow, and we wanted to build a wrapper around the gh-ost utility to manage some configuration on our end and to integrate it into our development/deployment workflows. We were hoping to build this wrapper in Go and consume the library directly.

When building out the proof of concept, we noticed that migrator.go and a few other places are starting infinite goroutines (for example the initiateStatus) that seem to be relying on the fact that it is invoked from a CLI and that the program will exit when Migrate() is complete. The behavior we saw was even after the migration completed, statuses were still being reporting to STDOUT.

The wrapper we are building will be a long running process (http server) that will manage the invocations of the gh-ost library. Would you be willing to accept a PR that cleans up these infinite goroutines, allowing the core logic to be used outside of the single CLI run?

Happy to hear any feedback on this approach if not. Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions