[
https://issues.apache.org/jira/browse/OAK-6137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrei Dulceanu updated OAK-6137:
---------------------------------
Description: When creating the {{ChangeDispatcher}} instance in the
constructor of {{LockBasedScheduler}} we should avoid the call to
{{LockBasedScheduler.getHeadNodeState()}}. This is a call to an overridable
method at construction time, which can be troublesome as the instance in not
fully initialised yet. On top of that the default implementation might have
side effects through its call to {{refreshHead}}. We should probably just use
{{head.get()}} to initialise that {{ChangeDispatcher}} instance. (was: When
creating the {{ChangeDispatcher}} instance in the constructor of
{{LockBasedScheduler}} we should avoid the call to
{{LockBasedScheduler.getHeadNodeState()}}. This is a call to an overridable
method at construction time, which can be troublesome as the instance in not
fully initialises yet. On top of that the default implementation might have
side effects through its call to {{refreshHead}}. We should probably just use
{{head.get()}} to initialise that {{ChangeDispatcher}} instance.)
> Remove call to getHeadNodeState in LockBasedScheduler constructor
> -----------------------------------------------------------------
>
> Key: OAK-6137
> URL: https://issues.apache.org/jira/browse/OAK-6137
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: segment-tar
> Reporter: Andrei Dulceanu
> Assignee: Andrei Dulceanu
> Priority: Minor
> Fix For: 1.8, 1.7.3
>
>
> When creating the {{ChangeDispatcher}} instance in the constructor of
> {{LockBasedScheduler}} we should avoid the call to
> {{LockBasedScheduler.getHeadNodeState()}}. This is a call to an overridable
> method at construction time, which can be troublesome as the instance in not
> fully initialised yet. On top of that the default implementation might have
> side effects through its call to {{refreshHead}}. We should probably just use
> {{head.get()}} to initialise that {{ChangeDispatcher}} instance.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)