Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6214

Snapshots numberToKeep param only keeps n-1 backups

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.9
    • Fix Version/s: 5.1, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

        1. SOLR-6214.patch
          9 kB
          Ramana
        2. SOLR-6214.patch
          6 kB
          Varun Thacker
        3. SOLR-6214.patch
          6 kB
          Varun Thacker

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              maho Mathias H.
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: