Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove waitgroup handling from Stopping of harvesters #4336
During trying to reproduce #4332 it seems the waitgroup in the Stop part is not needed. Even more it could cause issues.
The initial approach to fix the race was to pass the waitgroup to the harvester. But this would change the harvester interface which I would like to keep as simple as possible.
Before one of the problems was, that the harvester was added to the registry early which means Stop was potentially called on a harvester that was not started yet. This should now be prevented by checking on Start if the harvester was already stopped before any callback methods are registered.