Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Prevent application hang on some firehose errors #115

Merged
merged 9 commits into from
Sep 13, 2017

Conversation

johnsonj
Copy link
Contributor

@johnsonj johnsonj commented Sep 13, 2017

Change:

  • Make the Nozzle resilient to multiple Stop calls. Prevent hangs on the main thread due to channel management issues here. Fix some channel management issues (close it when it's done).

Refactoring:

  • Introduce app package. Move most logic from main into app. This is moving towards adding test coverage for this outer logic.

Logging:

  • Added logging around flush handlers
  • Removed noisy log for nil messages. This would flood 1000's of entries on shutdown and added no value.

Fixes #112

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
The done channel was being left open after the consumer drained the done
meesage. Calling the Stop() method 2 times in this state would cause the
program to hang while trying to send done <- struct{}{}.

Change the nozzle to keep track of running state and to return an error
when it's stopped incorrectly.

See cloudfoundry-community#112 for more detail
- hearbeater -> heartbeater
- if heartbeat.Start is called multiple times log an error
- update tests that were not properly scanning logs for counter event.
  No trigger was happening which is required to run a cycle of the
  heartbeater.
This error message spams the logs and makes it very hard to debug. Just
noise.
@johnsonj johnsonj merged commit 3fdc6ac into cloudfoundry-community:develop Sep 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants