Skip to content

Conversation

@YannRobert
Copy link
Contributor

This reopen PR #97

In some case, we can get ```java.lang.IllegalStateException: Pool not open``` when Thread ```jmxtrans-export-1``` calls write(...) on a GraphiteWriter that was previously closed.
In order to prevent that - as much as possible - we can shutdownNow() the ScheduledExecutorServices so that tasks that are currently running can detect that the Thread is interrupted, and eventually terminate earlier.
… state of each of the OutputWriters is maintained by OutputWriterSet class, that also provided way to ensure consistent write on all OutputWriters even when some of them are failing. Methods ```startAll()```, ```stopAll()``` and ```writeAll()``` are mutually synchronized, so that we neither stop OutputWriters while writing on it, nor write with OutputWriter while or after they are stopped.
…exported, so that in case of an Excpetion during the export, we try again to export this batch on the next export invocation
…to allow concurrent calls to writeAll() but still control that writeAll() cannot be used while the Object is changing it's internal state (starting or stopping)
…bjects. This provides an abstraction of the In-Memory Collection being used to store the collected metrics waiting to be exported.
…le-threaded export task. When Queries have OutputWriter(s) then they are set with a specific Sink And Source, that will be exported as it was before, in a separate task. This has the benefit of interrupting the export immediatly when a backend is failing without retrying until the next scheduled time, thus avoiding flooding the logs with as many Exceptions as they are metrics.
…in order to avoid having our logs filled by with uncategorised RuntimeException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant