Non-blocking CompositeNodeStore merges
@@ -96,8 +96,6 @@ public class CompositeNodeStore implements NodeStore, Observable {
private final ChangeDispatcher dispatcher;
- private final Lock mergeLock = new ReentrantLock();
-
// visible for testing only
CompositeNodeStore(MountInfoProvider mip, NodeStore globalStore, List<MountedNodeStore> nonDefaultStore) {
this(mip, globalStore, nonDefaultStore, CompositeNodeStoreMonitor.EMPTY_INSTANCE, CompositeNodeStoreMonitor.EMPTY_INSTANCE);
@@ -146,8 +144,6 @@ public class CompositeNodeStore implements NodeStore, Observable {
assertNoChangesOnReadOnlyMounts(nodeBuilder);
- mergeLock.lock();
- try {
// merge the global builder and apply the commit hooks within
MountedNodeStore globalStore = ctx.getGlobalStore();
CommitHookEnhancer hookEnhancer = new CommitHookEnhancer(commitHook, ctx, nodeBuilder);
@@ -158,9 +154,6 @@ public class CompositeNodeStore implements NodeStore, Observable {
hookEnhancer.processCommit(globalResult, globalResult, info);
}
return ctx.createRootNodeState(globalResult);
- } finally {
- mergeLock.unlock();
- }
}
private void assertNoChangesOnReadOnlyMounts(CompositeNodeBuilder nodeBuilder) throws CommitFailedException {
