diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 84e37245775..6508d4b0a81 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -622,6 +622,9 @@ Bug Fixes * SOLR-2909: Add support for ResourceLoaderAware tokenizerFactories in synonym filter factories. (Tom Klonikowski, Jun Ohtani via Koji Sekiguchi) + +* SOLR-3168: ReplicationHandler "numberToKeep" & "maxNumberOfBackups" parameters + would keep only 1 backup, even if more than 1 was specified (Neil Hooey, James Dyer) Other Changes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/handler/SnapShooter.java b/solr/core/src/java/org/apache/solr/handler/SnapShooter.java index bbfd63fb4a9..e0415a8f9ab 100644 --- a/solr/core/src/java/org/apache/solr/handler/SnapShooter.java +++ b/solr/core/src/java/org/apache/solr/handler/SnapShooter.java @@ -135,7 +135,7 @@ public class SnapShooter { Collections.sort(dirs); int i=1; for(OldBackupDirectory dir : dirs) { - if( i > numberToKeep-1 ) { + if( i++ > numberToKeep-1 ) { SnapPuller.delTree(dir.dir); } }