On 18.12.13 9:20 , Marcel Reutegger wrote:
Hi,
Purging (should) only happen for refresh calls with the keepChanges
parameter set to true. This might be optimised however for the case
where the persisted branch has not yet been created (i.e.
org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch.InMemory) by
tweaking the way (Kernel|Mongo)NodeStoreBranch and
(Kernel|Mongo)RootBuilder interact.
in the case described by Chetan the branch state is persisted pretty
quickly because the package install consists of many nodes. the
question is rather if there is a way to optimize the case when the
branch state is persisted with in-memory changes on top of it
and a refresh with keepChanges comes in.
We could rebase the branch and then rebase the in memory changes on top
of the rebased branch. This would get us rid of the branch commit. But
wouldn't get us rid of the rebase operation on the persisted branch. So
I'm not too sure this will gain us a lot.
Michael
Regards
Marcel