Solr
  1. Solr
  2. SOLR-3361

"maxNumberOfBackups" does not work with "backupAfter"=commit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6.1, 4.0-ALPHA
    • Component/s: replication (java)
    • Labels:
      None

      Description

      Tomás Fernández Löbbe reported on SOLR-3033 that when specifying the init parameter combination "maxNumberOfBackups" with "backupAfter"=commit, the backups do not get cleaned up.

      1. SOLR-3361.patch
        3 kB
        James Dyer
      2. SOLR-3361-failingtest.patch
        13 kB
        James Dyer
      3. SOLR-3361.patch
        1.0 kB
        James Dyer

        Activity

        Hide
        James Dyer added a comment -

        here is the fix. I had not created a unit test for this to prevent the ReplicationHandler test taking even longer to complete. Bad idea as commits handle the backup in an entirely different code branch than the one I had originally modified!

        Show
        James Dyer added a comment - here is the fix. I had not created a unit test for this to prevent the ReplicationHandler test taking even longer to complete. Bad idea as commits handle the backup in an entirely different code branch than the one I had originally modified!
        Hide
        James Dyer added a comment -

        Tomas provided this test on SOLR-3033.

        Show
        James Dyer added a comment - Tomas provided this test on SOLR-3033 .
        Hide
        James Dyer added a comment -

        Here's a patch that has both a fix and an improved unit test. There are basically 3 scenarios, all of which now get tested:

        1. User does an interactive command with the "numberToKeep" request param.
        2. User has "maxBackupsToKeep" in their configuration but it still doing backups using the interactive command.
        3. User is relying on commits to do backups automatically.

        I will commit to Trunk and 3.x (3.6.1) shortly.

        Show
        James Dyer added a comment - Here's a patch that has both a fix and an improved unit test. There are basically 3 scenarios, all of which now get tested: 1. User does an interactive command with the "numberToKeep" request param. 2. User has "maxBackupsToKeep" in their configuration but it still doing backups using the interactive command. 3. User is relying on commits to do backups automatically. I will commit to Trunk and 3.x (3.6.1) shortly.
        Hide
        James Dyer added a comment -

        Committed.

        Trunk: r1329337
        3.6 Branch: r1329351

        Also put a note on the wiki that 3.6.0 users will need this patch for this to work with "backupAfter".

        Thanks Tomas.

        Show
        James Dyer added a comment - Committed. Trunk: r1329337 3.6 Branch: r1329351 Also put a note on the wiki that 3.6.0 users will need this patch for this to work with "backupAfter". Thanks Tomas.
        Hide
        Uwe Schindler added a comment -

        Bulk close for 3.6.1

        Show
        Uwe Schindler added a comment - Bulk close for 3.6.1

          People

          • Assignee:
            James Dyer
            Reporter:
            James Dyer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development