[ 
https://issues.apache.org/jira/browse/OAK-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14580088#comment-14580088
 ] 

Chetan Mehrotra commented on OAK-2972:
--------------------------------------

The bug is in the activate logic

{code}
--&& (dataSource == null || (customBlobDataSource && blobDataSource == null))) {
++&& (dataSource == null || blobDataSource == null))) {
{code}

One possible fix would be to drop the check for {{customBlobDataSource}} as in 
any case we want both to be initialized. If a {{customBlobDataSource}} is not 
set then {{blobDataSource ==  dataSource}}. This would ensure that 
initialization would be delayed untill all the required references are met.

Thinking more about it we should do away with {{customBlobDataSource}} config. 
If a different DataSource has to be used then admin would change the target 
filter for {{blobDataSource}} and activate would delay the init untill both are 
defined

> DocumentNodeStore gets initialized multiple time with RDB persistence
> ---------------------------------------------------------------------
>
>                 Key: OAK-2972
>                 URL: https://issues.apache.org/jira/browse/OAK-2972
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: rdbmk
>            Reporter: Chetan Mehrotra
>              Labels: osgi
>             Fix For: 1.3.1, 1.2.3, 1.0.15
>
>
> Depending on startup sequence it can happen that {{DocumentNodeStore}} gets 
> initialized multiple times. 
> So far with Mongo {{DocumentNodeStoreService}}  was only dependent on one 
> external reference of {{BlobStore}}. However with RDB there are two more 
> external reference for {{DataSource}} one for nodes and other for blobs. 
> SCR (Felix Service Component Runtime) would invoke both {{bindDataSource}} 
> and {{bindBlobDataSource}} and currently there is no check to avoid re 
> initialization. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to