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

Bubble Throwables when executing Runnables #112

Merged
merged 1 commit into from
Nov 13, 2017

Commits on Aug 9, 2017

  1. Bubble Throwables when executing Runnables

    This change updates calls to ExecutorService.submit (mostly deamons), to
    call ExecutorService.execute instead.  The submit variant returns a
    Future which will contain any errors that are thrown from the Runnable.
    However, nothing was checking these throwables for errors.  If an error
    happens, for example an OutOfMemoryError or RuntimeException thrown from
    a custom AWSCredentialsProvider, the deamon thread will die without ever
    logging any error information.  Changing this to use execute allows the
    Thread's UncaughtExceptionHandler or the default
    UncaughtExceptionHandler to properly handle the failure.  At a minimum
    this allows the error to be logged.  Some clients may wish to respond to
    an OutOfMemoryError by taking a more severe action, such as restaring
    the service.  Given that failure of these deamon threads will likely
    wedge the KPL, some retry logic or a hard shutdown should probably be
    implemented in a subsequent commit.
    jeremysears committed Aug 9, 2017
    Configuration menu
    Copy the full SHA
    753312f View commit details
    Browse the repository at this point in the history