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

Index replication could delete segments first

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 8.1
    • replication (java)
    • None

    Description

      Index replication could optionally delete files that it knows will not be needed first. This would reduce disk capacity requirements of Solr, and it would reduce some disk fragmentation when space get tight.

      Solr (IndexFetcher) already grabs the remote file list, and it could see which files it has locally, then delete the others. Today it asks Lucene to deleteUnusedFiles at the end. This new mode would probably only be useful if there is no SolrIndexSearcher open, since it would prevent the removal of files.

      The motivating scenario is a SolrCloud replica that is going into full recovery. It ought to not be fielding searches. The code changes would not depend on SolrCloud though.

      This option would have some danger the user should be aware of. If the replication fails, leaving the local files incomplete/corrupt, the only recourse is to try full replication again. You can't just give up and field queries.

      Attachments

        1. SOLR-12999.patch
          22 kB
          Noble Paul
        2. SOLR-12999.patch
          20 kB
          Noble Paul

        Issue Links

          Activity

            People

              noble.paul Noble Paul
              dsmiley David Smiley
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: