Marcel Reutegger created OAK-306: ------------------------------------ Summary: Limit session refresh on namespace registry use Key: OAK-306 URL: https://issues.apache.org/jira/browse/OAK-306 Project: Jackrabbit Oak Issue Type: Improvement Components: core, jcr Reporter: Marcel Reutegger Priority: Minor
Currently the session associated with a NamespaceRegistryImpl refreshes itself via the NamespaceRegistryImpl.refresh() callback whenever a namespace (prefix or URI) is looked up or modified. See OAK-149. This contradicts with one of the goal we have in Oak to provide a stable snapshot view of the repository and only move to the the most recent revision when explicitly requested via Session.refresh(boolean). Jukka and I had a discussion about this today and we'd like to change the current behaviour the following way: - The NamespaceRegistryImpl should read at the same revision as the associated JCR Session. This may somewhat violate the spec, because then the NamespaceRegistry does not immediately see new namespaces added by another client, but we don't give that guarantee anyway when it comes to reading the latest root. With an explicit Session.refresh(), an attempt can be made by the client to make new namespaces visible created by other sessions. - The NamespaceRegistryImpl only calls refresh() when it modifies namespaces to make sure the associated session sees them in the in-content representation. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira