[
https://issues.apache.org/jira/browse/OAK-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574174#comment-14574174
]
Francesco Mari commented on OAK-2960:
-------------------------------------
The difference is the presence of the {{@Modified}} method itself.
Without the {{@Modified}} method, the sequence of callbacks seen by the
component during its lifecycle was {{activated()}}, {{deactivated()}},
{{activated()}}, {{deactivated()}}, and so on. This means that the
{{DocumentStore}}, the {{BlobStore}} and everything else had to be finalized
and reinitialized at every configuration change.
With the {{@Modified}} method, the sequence of callbacks seen by the component
during its lifecycle is {{activated()}}, zero or more {{modified()}}, and
finally {{deactivated()}}. This doesn't mean that the {{DocumentStore}}, the
{{BlobStore}} and everything doesn't have to be finalized and reinitialized. It
just needs to be done when some "critical" properties change.
To correctly implement this behaviour, the component should maintain every
configuration property value into instance variables. When the {{@Modified}}
method is called, the new property values should be compared with the old ones
(saved in the instance variables). If a change is detected for "critical"
property values, like {{customBlobStore}}, then the appropriate finalizations
and reinitializations should be performed. Otherwise, the new property values
can just be set and they will be automatically picked up.
This is the reason why I think that OAK-2016 is wrong. It doesn't fully
implement this strategy. As it is, it may be safer to just go through a
complete cycle of {{deactivated()}} and {{activated()}} callbacks.
> SegmentNodeStoreService should correctly handle modifications in the
> configuration
> ----------------------------------------------------------------------------------
>
> Key: OAK-2960
> URL: https://issues.apache.org/jira/browse/OAK-2960
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segmentmk
> Reporter: Francesco Mari
> Priority: Critical
> Fix For: 1.3.0
>
> Attachments: OAK-2960-01.patch
>
>
> The {{SegmentNodeStoreService}} component recently introduced an
> {{@Modified}} method that picks up changes in just one configuration property
> and ignores the rest.
> Some configuration properties, like {{customBlobStore}}, have a huge impact
> on the dynamic behaviour of the component. If the component fails to pick up
> these changes, its behaviour is just wrong.
> The {{@Modified}} method should be removed. It is safer to go through a
> complete deactivation and activation process.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)