mirror of https://github.com/apache/lucene.git
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:
parent
af77642d82
commit
390454fba6
|
@ -623,6 +623,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
|
||||
----------------------
|
||||
* SOLR-2922: Upgrade commons-io and commons-lang to 2.1 and 2.6, respectively. (koji)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue