You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Francesco Mari (JIRA)" <ji...@apache.org> on 2018/09/06 08:13:00 UTC

[jira] [Updated] (OAK-6890) Background threads might not be automatically restarted

     [ https://issues.apache.org/jira/browse/OAK-6890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francesco Mari updated OAK-6890:
--------------------------------
    Fix Version/s: 1.6.14

> Background threads might not be automatically restarted
> -------------------------------------------------------
>
>                 Key: OAK-6890
>                 URL: https://issues.apache.org/jira/browse/OAK-6890
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>            Priority: Critical
>              Labels: resilience
>             Fix For: 1.7.11, 1.8.0, 1.6.14
>
>
> The background threads used in {{FileStore}} are implemented by wrapping {{Runnable}} instances in {{SafeRunnable}}, and by handing the {{SafeRunnable}} instances over to a {{ScheduledExecutorService}}. 
> The documentation of {{ScheduledExecutorService#scheduleAtFixedRate}} states that "if any execution of the task encounters an exception, subsequent executions are suppressed". But a {{SafeRunnable}} always re-throws any {{Throwable}} that it catches, effectively preventing itself from executing again in the future.
> There is more than one solution to this problem. One of these is to never re-throw any exception. Even if it doesn't always make sense, e.g. in case of an {{OutOfMemoryError}}, never re-throwing an exception would better fulfil the assumption that background threads should always be up and running even in case of error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)