This starts to sound like Oak should have an explicit interface to announce the situation to clients, allowing them to implement their own policy about whether to attempt a restart or not.
-Rob -----Original Message----- From: Marcel Reutegger [mailto:[email protected]] Sent: Wednesday, September 09, 2015 8:39 AM To: [email protected] Subject: Re: System.exit()???? , was: svn commit: r1696202 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document: ClusterNodeInfo.java DocumentMK.java DocumentNodeStore.java DocumentNodeStoreService.java util/LeaseCheckDoc... Hi, On 09/09/15 14:12, "Stefan Egli" wrote: >After some prototyping and running into OAK-3373 [1] I'm no longer sure >if restarting the DocumentNodeStore is a feasible path to go, esp in >the short term. The problem encountered so far is that Observers cannot >be easily switched from old to (restarted/)new store due to: > > * as pointed out by MichaelD they could have a backlog yet to process >towards the old store - which they cannot access anymore as that one >would be forcibly closed in my view, those observers should be unregistered from the store before it is shut down and any backlog cleared, i.e. it will be lost. > * there is not yet a proper way to switch from old to new ('reset') - >esp is there a risk that there could be a gap (this part we might be >able to fix though, not sure) I don't see a requirement for this. if you restart the entire stack you will also have a gap. > * both above carry the risk that Observers miss some changes - >something which would be unacceptable I guess. same as above. I don't think observers must survive a node store restart. I even think it is wrong. Every client of the node store should be restarted in that case, including Observers. Regards Marcel
