Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid write on closed output writer #112

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Jun 8, 2015

  1. Avoid calling write(...) on closed OutputWriter

    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.
    YannRobert committed Jun 8, 2015
    Configuration menu
    Copy the full SHA
    0e4946d View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2015

  1. Check an OutputWriter is started before calling write(...) on it. The…

    … 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.
    YannRobert committed Jun 9, 2015
    Configuration menu
    Copy the full SHA
    381c8e2 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2015

  1. OutputWriter methods are synchronized using a ReadWriteLock in order …

    …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)
    YannRobert committed Jun 15, 2015
    Configuration menu
    Copy the full SHA
    d6cd671 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2015

  1. Revert "Fix thread safety during the "stop()" phase."

    This reverts commit 4f1ce2c.
    YannRobert committed Nov 9, 2015
    Configuration menu
    Copy the full SHA
    32324c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2cab34c View commit details
    Browse the repository at this point in the history