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

Bertrand Delacretaz commented on OAK-2265:
------------------------------------------

I guess the question is whether we're discussing a) temporary backend 
inavailability that's meant to be fixed within a few seconds or b) a backend 
that's really gone.

I agree that for a) just throwing RepositoryException or something is fine, but 
a delay should probably also be introduced to avoid throwing millions of those.

For b), disabling the services is definitely the OSGi way of doing things.

So if the DocumentNodeStore is able to differentiate between a) and b) (maybe 
using a configurable timer to switch between one or the other mode) it's 
probably best to have both.

> DocumentNodeStore service should go away if MongoDB becomes unavailable
> -----------------------------------------------------------------------
>
>                 Key: OAK-2265
>                 URL: https://issues.apache.org/jira/browse/OAK-2265
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Bertrand Delacretaz
>
> Stopping the MongoDB backend that a Sling instance is using via the 
> DocumentNodeStore service should cause that OSGi service to be unregistered.
> Currently the service stays registered even if MongoException$Network is 
> thrown when trying to access the MongoDB backend.
> The code that manages the service should ping the backend and 
> register/unregister the DocumentNodeStore to follow the backend's 
> availablity. This will allow other services that depend on DocumentNodeStore 
> to restart correctly once MongoDB is available again.



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

Reply via email to