Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java =================================================================== --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java (revision 1783390) +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java (working copy) @@ -424,6 +424,7 @@ void removeLeafDocuments(VersionGCStats stats) throws IOException { int removeCount = removeDeletedDocuments(getLeafDocIdsToDelete(), "(leaf)"); + leafDocIdsToDelete.clear(); stats.deletedLeafDocGCCount += removeCount; stats.deletedDocGCCount += removeCount; }