rishabhdaim commented on code in PR #950:
URL: https://github.com/apache/jackrabbit-oak/pull/950#discussion_r1201838124


##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/UnrecoveredRevisionTest.java:
##########
@@ -0,0 +1,813 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jackrabbit.oak.plugins.document;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
+import 
org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper;
+import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
+import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.stats.Clock;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import junitx.util.PrivateAccessor;
+
+/**
+ * Tests unrecovered revisions on a document
+ */
+public class UnrecoveredRevisionTest {
+    
+    interface BreakpointCallback {
+        
+        void breakpointCallback(String contextMsg);
+        
+    }
+    
+    class ControllableMemoryDocumentStore extends MemoryDocumentStore {
+        
+        private final AtomicInteger remainingOps;
+        private BreakpointCallback callback;
+        private Set<Collection<?>> restrictedCollections = new HashSet<>();
+        private List<UpdateOp> writtenUpdateOps = new LinkedList<>();
+        
+        ControllableMemoryDocumentStore(int remainingOps, BreakpointCallback 
callback) {
+            this.remainingOps = new AtomicInteger(remainingOps);
+            this.callback = callback;
+            // restrict only NODES by default
+            this.restrictedCollections.add(Collection.NODES);
+        }
+        
+        public void clearOps() {
+            writtenUpdateOps.clear();
+        }
+
+        public void printOps() {
+            for (UpdateOp updateOp : writtenUpdateOps) {
+                System.out.println("written updateOp: " + updateOp.toString());
+            }
+        }
+        
+        private void registerWrittenUpdateOp(Collection<?> collection, 
UpdateOp updateOp) {
+            if (restrictedCollections.contains(collection)) {
+                writtenUpdateOps.add(updateOp);
+            }
+        }
+
+        private void registerWrittenUpdateOp(Collection<?> collection, 
List<UpdateOp> trimmedOps) {
+            if (restrictedCollections.contains(collection)) {
+                writtenUpdateOps.addAll(trimmedOps);
+            }
+        }
+
+        private void setBreakpointCallback(BreakpointCallback callback) {
+            this.callback = callback;
+        }
+        
+        @SuppressWarnings("unused")
+        private void setRestrictedCollections(Collection<?>... collections) {
+            restrictedCollections.clear();
+            restrictedCollections.addAll(Arrays.asList(collections));
+        }
+        
+        private void setRestrictedCollections(Set<Collection<?>> collections) {
+            restrictedCollections.clear();
+            restrictedCollections.addAll(collections);
+        }
+        
+        public Set<Collection<?>> getRestrictedCollections() {
+            return new HashSet<>(restrictedCollections);
+        }
+
+        public AtomicInteger getRemainingOps() {
+            return remainingOps;
+        }
+        
+        private void breakpoint(String msg) {
+            callback.breakpointCallback(msg);
+        }
+
+        private void allowOp(Collection<?> collection) {
+            if (!restrictedCollections.isEmpty() && 
!restrictedCollections.contains(collection)) {
+                return;
+            }
+            int remaining = remainingOps.decrementAndGet();
+            if (remaining < 0) {
+                breakpoint("remaining is " + remaining);
+            }
+        }
+        
+        private int allowedOps(Collection<?> collection, int desiredOps) {
+            if (!restrictedCollections.isEmpty() && 
!restrictedCollections.contains(collection)) {
+                return desiredOps;
+            }
+            int current = remainingOps.get();
+            int remaining = current - desiredOps;
+            if (remaining >= 0) {
+                remainingOps.compareAndSet(current, remaining);
+                return desiredOps;
+            } else {
+                remainingOps.compareAndSet(current, 0);
+                return current;
+            }
+        }
+        
+        @Override
+        public <T extends Document> boolean create(Collection<T> collection,
+                List<UpdateOp> updateOps) {
+            Lock lock = rwLock().writeLock();
+            lock.lock();
+            try {
+                ConcurrentSkipListMap<String, T> map = getMap(collection);
+                for (UpdateOp op : updateOps) {
+                    if (map.containsKey(op.getId())) {
+                        return false;
+                    }
+                }
+                
+                final List<UpdateOp> trimmedOps = new LinkedList<>();
+                final List<UpdateOp> lateOps = new LinkedList<>();
+                trimOps(collection, updateOps, trimmedOps, lateOps);
+                boolean result = super.create(collection, trimmedOps);
+                registerWrittenUpdateOp(collection, trimmedOps);
+                if (trimmedOps.size() != updateOps.size()) {
+                    breakpoint("wanted " + updateOps.size() + " ops, allowed 
only " + trimmedOps.size());
+                    super.create(collection, lateOps);
+                }
+                return result;
+            
+            } finally {
+                lock.unlock();
+            }
+        }
+
+        private <T extends Document> void trimOps(Collection<T> collection, 
+                List<UpdateOp> updateOps, List<UpdateOp> immediateOps, 
List<UpdateOp> lateOps) {
+            int max = allowedOps(collection, updateOps.size());
+            ArrayList<UpdateOp> al = new ArrayList<>(updateOps);
+            immediateOps.addAll(al.subList(0, max));
+            lateOps.addAll(al.subList(max, updateOps.size()));
+        }
+        
+        private <T extends Document> List<String> trimString(Collection<T> 
collection, List<String> updateOps) {
+            int max = allowedOps(collection, updateOps.size());
+            ArrayList<String> al = new ArrayList<>(updateOps);
+            List<String> trimmedUpdateOps = al.subList(0, max);
+            return trimmedUpdateOps;
+        }
+        
+        private ReadWriteLock rwLock() {
+            try {
+                return (ReadWriteLock) PrivateAccessor.getField(this, 
"rwLock");
+            } catch (NoSuchFieldException e) {
+                fail(e.getMessage());
+                // never reached:
+                return null;
+            }
+        }
+
+        @Override
+        public <T extends Document> @Nullable T createOrUpdate(Collection<T> 
collection,
+                UpdateOp update) {
+            allowOp(collection);
+            registerWrittenUpdateOp(collection, update);
+            return super.createOrUpdate(collection, update);
+        }
+        
+        private <T extends Document> List<T> superCreateOrUpdate(Collection<T> 
collection, List<UpdateOp> updateOps) {
+            List<T> result = new ArrayList<T>(updateOps.size());
+            for (UpdateOp update : updateOps) {
+                result.add(super.createOrUpdate(collection, update));
+            }
+            return result;
+        }
+        
+        @Override
+        public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection,
+                List<UpdateOp> updateOps) {
+            final List<UpdateOp> trimmedOps = new LinkedList<>();
+            final List<UpdateOp> lateOps = new LinkedList<>();
+            trimOps(collection, updateOps, trimmedOps, lateOps);
+            List<T> result = superCreateOrUpdate(collection, trimmedOps);
+            registerWrittenUpdateOp(collection, trimmedOps);
+            if (trimmedOps.size() != updateOps.size()) {
+                breakpoint("wanted " + updateOps.size() + " ops, allowed only 
" + trimmedOps.size());
+                superCreateOrUpdate(collection, lateOps);
+            }
+            return result;
+        }
+        
+        @Override
+        public <T extends Document> T findAndUpdate(Collection<T> collection,
+                UpdateOp update) {
+            allowOp(collection);
+            registerWrittenUpdateOp(collection, update);
+            return super.findAndUpdate(collection, update);
+        }
+        
+        @Override
+        public <T extends Document> void remove(Collection<T> collection,
+                List<String> keys) {
+            throw new IllegalStateException("not yet implemented");
+//            super.remove(collection, trimString(collection, keys));
+        }
+        
+        @Override
+        public <T extends Document> int remove(Collection<T> collection,
+                Map<String, Long> toRemove) {
+            throw new IllegalStateException("not yet implemented");
+        }
+        
+        @Override
+        public <T extends Document> void remove(Collection<T> collection, 
String key) {
+            allowOp(collection);
+            super.remove(collection, key);
+        }
+        
+        @Override
+        public <T extends Document> int remove(Collection<T> collection,
+                String indexedProperty, long startValue, long endValue)
+                throws DocumentStoreException {
+            throw new IllegalStateException("not yet implemented");

Review Comment:
   Shouldn't this be `UnsupportedOperationException`,  wdyt?



##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/UnrecoveredRevisionTest.java:
##########
@@ -0,0 +1,813 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jackrabbit.oak.plugins.document;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
+import 
org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper;
+import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
+import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.stats.Clock;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import junitx.util.PrivateAccessor;
+
+/**
+ * Tests unrecovered revisions on a document
+ */
+public class UnrecoveredRevisionTest {
+    
+    interface BreakpointCallback {
+        
+        void breakpointCallback(String contextMsg);
+        
+    }
+    
+    class ControllableMemoryDocumentStore extends MemoryDocumentStore {
+        
+        private final AtomicInteger remainingOps;
+        private BreakpointCallback callback;
+        private Set<Collection<?>> restrictedCollections = new HashSet<>();
+        private List<UpdateOp> writtenUpdateOps = new LinkedList<>();
+        
+        ControllableMemoryDocumentStore(int remainingOps, BreakpointCallback 
callback) {
+            this.remainingOps = new AtomicInteger(remainingOps);
+            this.callback = callback;
+            // restrict only NODES by default
+            this.restrictedCollections.add(Collection.NODES);
+        }
+        
+        public void clearOps() {
+            writtenUpdateOps.clear();
+        }
+
+        public void printOps() {
+            for (UpdateOp updateOp : writtenUpdateOps) {
+                System.out.println("written updateOp: " + updateOp.toString());
+            }
+        }
+        
+        private void registerWrittenUpdateOp(Collection<?> collection, 
UpdateOp updateOp) {
+            if (restrictedCollections.contains(collection)) {
+                writtenUpdateOps.add(updateOp);
+            }
+        }
+
+        private void registerWrittenUpdateOp(Collection<?> collection, 
List<UpdateOp> trimmedOps) {
+            if (restrictedCollections.contains(collection)) {
+                writtenUpdateOps.addAll(trimmedOps);
+            }
+        }
+
+        private void setBreakpointCallback(BreakpointCallback callback) {
+            this.callback = callback;
+        }
+        
+        @SuppressWarnings("unused")
+        private void setRestrictedCollections(Collection<?>... collections) {

Review Comment:
   Can we remove this un-used method or do we plan to use it in the future?



##########
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/UnrecoveredRevisionTest.java:
##########
@@ -0,0 +1,813 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jackrabbit.oak.plugins.document;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+
+import org.apache.jackrabbit.oak.api.CommitFailedException;
+import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
+import 
org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper;
+import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
+import org.apache.jackrabbit.oak.spi.commit.EmptyHook;
+import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.stats.Clock;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import junitx.util.PrivateAccessor;
+
+/**
+ * Tests unrecovered revisions on a document
+ */
+public class UnrecoveredRevisionTest {
+    
+    interface BreakpointCallback {
+        
+        void breakpointCallback(String contextMsg);
+        
+    }
+    
+    class ControllableMemoryDocumentStore extends MemoryDocumentStore {
+        
+        private final AtomicInteger remainingOps;
+        private BreakpointCallback callback;
+        private Set<Collection<?>> restrictedCollections = new HashSet<>();
+        private List<UpdateOp> writtenUpdateOps = new LinkedList<>();
+        
+        ControllableMemoryDocumentStore(int remainingOps, BreakpointCallback 
callback) {
+            this.remainingOps = new AtomicInteger(remainingOps);
+            this.callback = callback;
+            // restrict only NODES by default
+            this.restrictedCollections.add(Collection.NODES);
+        }
+        
+        public void clearOps() {
+            writtenUpdateOps.clear();
+        }
+
+        public void printOps() {
+            for (UpdateOp updateOp : writtenUpdateOps) {
+                System.out.println("written updateOp: " + updateOp.toString());
+            }
+        }
+        
+        private void registerWrittenUpdateOp(Collection<?> collection, 
UpdateOp updateOp) {
+            if (restrictedCollections.contains(collection)) {
+                writtenUpdateOps.add(updateOp);
+            }
+        }
+
+        private void registerWrittenUpdateOp(Collection<?> collection, 
List<UpdateOp> trimmedOps) {
+            if (restrictedCollections.contains(collection)) {
+                writtenUpdateOps.addAll(trimmedOps);
+            }
+        }
+
+        private void setBreakpointCallback(BreakpointCallback callback) {
+            this.callback = callback;
+        }
+        
+        @SuppressWarnings("unused")
+        private void setRestrictedCollections(Collection<?>... collections) {
+            restrictedCollections.clear();
+            restrictedCollections.addAll(Arrays.asList(collections));
+        }
+        
+        private void setRestrictedCollections(Set<Collection<?>> collections) {
+            restrictedCollections.clear();
+            restrictedCollections.addAll(collections);
+        }
+        
+        public Set<Collection<?>> getRestrictedCollections() {
+            return new HashSet<>(restrictedCollections);
+        }
+
+        public AtomicInteger getRemainingOps() {
+            return remainingOps;
+        }
+        
+        private void breakpoint(String msg) {
+            callback.breakpointCallback(msg);
+        }
+
+        private void allowOp(Collection<?> collection) {
+            if (!restrictedCollections.isEmpty() && 
!restrictedCollections.contains(collection)) {
+                return;
+            }
+            int remaining = remainingOps.decrementAndGet();
+            if (remaining < 0) {
+                breakpoint("remaining is " + remaining);
+            }
+        }
+        
+        private int allowedOps(Collection<?> collection, int desiredOps) {
+            if (!restrictedCollections.isEmpty() && 
!restrictedCollections.contains(collection)) {
+                return desiredOps;
+            }
+            int current = remainingOps.get();
+            int remaining = current - desiredOps;
+            if (remaining >= 0) {
+                remainingOps.compareAndSet(current, remaining);
+                return desiredOps;
+            } else {
+                remainingOps.compareAndSet(current, 0);
+                return current;
+            }
+        }
+        
+        @Override
+        public <T extends Document> boolean create(Collection<T> collection,
+                List<UpdateOp> updateOps) {
+            Lock lock = rwLock().writeLock();
+            lock.lock();
+            try {
+                ConcurrentSkipListMap<String, T> map = getMap(collection);
+                for (UpdateOp op : updateOps) {
+                    if (map.containsKey(op.getId())) {
+                        return false;
+                    }
+                }
+                
+                final List<UpdateOp> trimmedOps = new LinkedList<>();
+                final List<UpdateOp> lateOps = new LinkedList<>();
+                trimOps(collection, updateOps, trimmedOps, lateOps);
+                boolean result = super.create(collection, trimmedOps);
+                registerWrittenUpdateOp(collection, trimmedOps);
+                if (trimmedOps.size() != updateOps.size()) {
+                    breakpoint("wanted " + updateOps.size() + " ops, allowed 
only " + trimmedOps.size());
+                    super.create(collection, lateOps);
+                }
+                return result;
+            
+            } finally {
+                lock.unlock();
+            }
+        }
+
+        private <T extends Document> void trimOps(Collection<T> collection, 
+                List<UpdateOp> updateOps, List<UpdateOp> immediateOps, 
List<UpdateOp> lateOps) {
+            int max = allowedOps(collection, updateOps.size());
+            ArrayList<UpdateOp> al = new ArrayList<>(updateOps);
+            immediateOps.addAll(al.subList(0, max));
+            lateOps.addAll(al.subList(max, updateOps.size()));
+        }
+        
+        private <T extends Document> List<String> trimString(Collection<T> 
collection, List<String> updateOps) {
+            int max = allowedOps(collection, updateOps.size());
+            ArrayList<String> al = new ArrayList<>(updateOps);
+            List<String> trimmedUpdateOps = al.subList(0, max);
+            return trimmedUpdateOps;
+        }
+        
+        private ReadWriteLock rwLock() {
+            try {
+                return (ReadWriteLock) PrivateAccessor.getField(this, 
"rwLock");
+            } catch (NoSuchFieldException e) {
+                fail(e.getMessage());
+                // never reached:
+                return null;
+            }
+        }
+
+        @Override
+        public <T extends Document> @Nullable T createOrUpdate(Collection<T> 
collection,
+                UpdateOp update) {
+            allowOp(collection);
+            registerWrittenUpdateOp(collection, update);
+            return super.createOrUpdate(collection, update);
+        }
+        
+        private <T extends Document> List<T> superCreateOrUpdate(Collection<T> 
collection, List<UpdateOp> updateOps) {
+            List<T> result = new ArrayList<T>(updateOps.size());
+            for (UpdateOp update : updateOps) {
+                result.add(super.createOrUpdate(collection, update));
+            }
+            return result;
+        }
+        
+        @Override
+        public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection,
+                List<UpdateOp> updateOps) {
+            final List<UpdateOp> trimmedOps = new LinkedList<>();
+            final List<UpdateOp> lateOps = new LinkedList<>();
+            trimOps(collection, updateOps, trimmedOps, lateOps);
+            List<T> result = superCreateOrUpdate(collection, trimmedOps);
+            registerWrittenUpdateOp(collection, trimmedOps);
+            if (trimmedOps.size() != updateOps.size()) {
+                breakpoint("wanted " + updateOps.size() + " ops, allowed only 
" + trimmedOps.size());
+                superCreateOrUpdate(collection, lateOps);
+            }
+            return result;
+        }
+        
+        @Override
+        public <T extends Document> T findAndUpdate(Collection<T> collection,
+                UpdateOp update) {
+            allowOp(collection);
+            registerWrittenUpdateOp(collection, update);
+            return super.findAndUpdate(collection, update);
+        }
+        
+        @Override
+        public <T extends Document> void remove(Collection<T> collection,
+                List<String> keys) {
+            throw new IllegalStateException("not yet implemented");
+//            super.remove(collection, trimString(collection, keys));
+        }
+        
+        @Override
+        public <T extends Document> int remove(Collection<T> collection,
+                Map<String, Long> toRemove) {
+            throw new IllegalStateException("not yet implemented");
+        }
+        
+        @Override
+        public <T extends Document> void remove(Collection<T> collection, 
String key) {
+            allowOp(collection);
+            super.remove(collection, key);
+        }
+        
+        @Override
+        public <T extends Document> int remove(Collection<T> collection,
+                String indexedProperty, long startValue, long endValue)
+                throws DocumentStoreException {
+            throw new IllegalStateException("not yet implemented");
+        }
+    }
+
+    @Rule
+    public DocumentMKBuilderProvider builderProvider = new 
DocumentMKBuilderProvider();
+
+    private Clock virtualClock;
+    private DocumentNodeStore ns1;
+    private DocumentNodeStore ns2;
+
+    private ControllableMemoryDocumentStore store;
+    
+    @Before
+    public void setup() throws Exception {
+        int createOrUpdateBatchSize = 1;
+        setup(createOrUpdateBatchSize);

Review Comment:
   we can inline this parameter and remove local variable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to