jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Package deployment check for locking leading to large no of small branch commits
Date Tue, 17 Dec 2013 17:26:08 GMT
Hi,

While profiling slow deployment of some packages on CQ (using Oak)
running on Mongo I noticed that its creating lots of small branch
commits. Looking into the invocation flow following appears to be
happening

1. Package contains lots of small nodes (~7000)
2. DocViewSAXImporter.createNode creates a new ContentHandler per
    Node
3. This creates instance of org.apache.jackrabbit.oak.jcr.xml.ImporterImpl
    which checks if the given path is locked or not
4. org.apache.jackrabbit.oak.jcr.lock.LockManagerImpl#isLocked then uses
    LockOperation to do the check
5. LockOperation#perform does a Session refresh
6. Session refresh triggers purge of current pending changes leading to a
    branch commit

As this flow gets invoked per node the number of branch commits are
very high which causes performance loss. If I disable the session
refresh in LockManager then package import times drops from 230 sec to
26 sec

So not sure where the fix is to be done. Should lock check be also
restricted to version at which session is pinned or one needs to be at
latest revision?

Marcel suggested that checking for locks can probably be done as part
of CommitHook

Chetan Mehrotra

[1] https://svn.apache.org/repos/asf/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSAXImporter.java

Mime
View raw message