[
https://issues.apache.org/jira/browse/OAK-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14208659#comment-14208659
]
Michael Marth commented on OAK-2265:
------------------------------------
[~bdelacretaz], I agree that upper layers must be able to deal with the fact
that Mongo is unavailable. However, the DocumentNodeStore and the repository
service are still available in such scenarios. So, I wonder if it would not be
preferable to throw an exception rather than unregistering the service. I think
that would be equally valid.
The benefit of the exception would be that existing apps probably catch this
exception (a least if it is a javax.jcr.RepositoryException).
> 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)