SOLR-3168: "numberToKeep" backups doesn't ever keep more than 1

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1294703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Dyer 2012-02-28 15:53:13 +00:00
parent af77642d82
commit 390454fba6
2 changed files with 4 additions and 1 deletions

View File

@ -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
----------------------

View File

@ -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);
}
}