Solr
  1. Solr
  2. SOLR-1531

Provide an option to remove the data directory on core unload

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 3.3, 4.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently the unload command keeps the core's data on disk even though the details of the core is deleted from configuration. Solr should have an option of cleaning the data directory on unload of a core.

      1. SOLR-1531.patch
        3 kB
        Paolo Castagna

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          Closed after release.

          Show
          Uwe Schindler added a comment - Closed after release.
          Hide
          Erick Erickson added a comment -
          Show
          Erick Erickson added a comment - This was fixed by https://issues.apache.org/jira/browse/SOLR-2610 .
          Hide
          Mark Miller added a comment -

          I did not notice this issue before - we resolved this issue in a duplicate recently.

          Show
          Mark Miller added a comment - I did not notice this issue before - we resolved this issue in a duplicate recently.
          Hide
          Hoss Man added a comment -

          Bulk of fixVersion=3.6 -> fixVersion=4.0 for issues that have no assignee and have not been updated recently.

          email notification suppressed to prevent mass-spam
          psuedo-unique token identifying these issues: hoss20120321nofix36

          Show
          Hoss Man added a comment - Bulk of fixVersion=3.6 -> fixVersion=4.0 for issues that have no assignee and have not been updated recently. email notification suppressed to prevent mass-spam psuedo-unique token identifying these issues: hoss20120321nofix36
          Hide
          Robert Muir added a comment -

          3.4 -> 3.5

          Show
          Robert Muir added a comment - 3.4 -> 3.5
          Hide
          Robert Muir added a comment -

          Bulk move 3.2 -> 3.3

          Show
          Robert Muir added a comment - Bulk move 3.2 -> 3.3
          Hide
          Hoss Man added a comment -

          Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email...

          http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

          Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed.

          A unique token for finding these 240 issues in the future: hossversioncleanup20100527

          Show
          Hoss Man added a comment - Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed. A unique token for finding these 240 issues in the future: hossversioncleanup20100527
          Hide
          Hoss Man added a comment -

          Paolo: thanks for working on this.

          i gave your patch a quick glance for the most part it seems good – although we should preserve the one arg version of CoreContainer.remove for back compat.

          as far as tests go: i can't remember off the top of my head how some of hte other CoreContainer tests work – the existing ones may all be Jetty based (using CoreAdminHandler).

          We should probably overhaul the SolrTestHarness to be more "multi-core" friendly, but one thing you could probably do for now, is let the TestHarness create a core, then use getCore().getCoreDescriptor().getCoreContainer(). from there you can create/destroy cores to your hearts content (and verify that the data dir goes away when it's suppose to, and stays arround when it's suppose to)

          Show
          Hoss Man added a comment - Paolo: thanks for working on this. i gave your patch a quick glance for the most part it seems good – although we should preserve the one arg version of CoreContainer.remove for back compat. as far as tests go: i can't remember off the top of my head how some of hte other CoreContainer tests work – the existing ones may all be Jetty based (using CoreAdminHandler). We should probably overhaul the SolrTestHarness to be more "multi-core" friendly, but one thing you could probably do for now, is let the TestHarness create a core, then use getCore().getCoreDescriptor().getCoreContainer(). from there you can create/destroy cores to your hearts content (and verify that the data dir goes away when it's suppose to, and stays arround when it's suppose to)
          Hide
          Paolo Castagna added a comment -

          This is my first (quick) patch to SOLR.

          I didn't find an existing test for CoreContainer and/or CoreAdminHandler.

          Also, I didn't use svn diff > SOLR-NNN.patch but Eclipse > Team > Create Patch... since I have other changes and I wasn't sure how to select them using svn diff (is it possible?)

          Running tests with Ant seems ok, but this gives me confidence that the patch isn't going to break anything... not that it actually works, since there are no new tests for it. I'll search how other handlers are tested.

          Show
          Paolo Castagna added a comment - This is my first (quick) patch to SOLR. I didn't find an existing test for CoreContainer and/or CoreAdminHandler. Also, I didn't use svn diff > SOLR-NNN.patch but Eclipse > Team > Create Patch... since I have other changes and I wasn't sure how to select them using svn diff (is it possible?) Running tests with Ant seems ok, but this gives me confidence that the patch isn't going to break anything... not that it actually works, since there are no new tests for it. I'll search how other handlers are tested.

            People

            • Assignee:
              Unassigned
              Reporter:
              Shalin Shekhar Mangar
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development