Hi Chetan, On Fri, Jul 4, 2014 at 2:35 AM, Chetan Mehrotra <[email protected]> wrote: > Hi, > > Currently JR FileVault supports 'noIntermediateSaves' property which > indicates that no intermediate save would be performed while a package > is being installed. However it does not appear to work as expected > > 1. AutoSave Usage > ------------------------ > > For this it uses AutoSave class which commits the change if certain > threshold is reached. If 'noIntermediateSaves' is set then this > threshold is set to Integer.MAX thus effectively disabling > intermediate commits. I see AutoSave being used at two placed in > Importer. One of them is guarded by autoSave.needsSave but other one > is not [1]. Would that be a bug? no. see [2]
> 2. Sub Packages > ------------------------- > > Other place where it does not work properly is when a package > contains sub packages as Vault needs to save details regarding > intermediate packages at various stages which causes any content > changes also getting committed. > > I see quite a few calls to Item.save in vault codebase for the path > taken by package installation. It might be possible to use a sub > session to perform internal bookkeeping task by vault and use ther > other session to save the package content and thus avoid intermediate > save. well, it is to discuss if sub-packages should be part of the atomicity of a package install. the current implementation treats each package individually. also, other operations like versioning are not atomic - this is just not possible w/o XA transactions. and IIRC, applying group membership was also done as a workspace operation, at least in early jackrabbit versions. I would also like to change the way that sub-packages are bundled [3], so this will streamline the auto-save handling. regards, toby > > Chetan Mehrotra > [1] > https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/Importer.java#L402 [2] https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/io/AutoSave.java#L141 [3] https://issues.apache.org/jira/browse/JCRVLT-33
