lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Thacker (JIRA)" <>
Subject [jira] [Updated] (SOLR-6214) Snapshots numberToKeep param only keeps n-1 backups
Date Thu, 12 Feb 2015 08:59:12 GMT


Varun Thacker updated SOLR-6214:
    Attachment: SOLR-6214.patch

File dir = new File(snapDir);
if (!dir.exists())  dir.mkdirs();

This is not needed because we call {{SimpleFSDirectory(destDir.toPath(), NoLockFactory.INSTANCE)}}
which creates the snapDir if not present.

Secondly I moved deleteOldBackups after the snapshot gets created. That makes sense right?

Fixed the test to catch this regression. If you just run the test without making the fix to
SnapShooter the test will fail.

> Snapshots numberToKeep param only keeps n-1 backups
> ---------------------------------------------------
>                 Key: SOLR-6214
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.9
>            Reporter: Mathias H.
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>         Attachments: SOLR-6214.patch, SOLR-6214.patch
> The numberToKeep param for snapshots doesn't work anymore. If you set the param to '2',
only '1' backup is kept.
> In the ReplicationHandler in line 377 snapShooter.validateCreateSnapshot(); creates an
empty directory for the new snapshot. The deleteOldBackups() method in Snapshooter which will
be executed before the backup is created, now sees the two directories an deletes the old
one. But this is wrong because the empty directory for the new backup should not be considered.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message