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

Concurrent core reloads mess up commits when using Schema API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.1
    • None
    • None

    Description

      When using Schema API SchemaManager class triggers a core reload here: https://github.com/apache/solr/blob/cfc953b6b906ef742bba57024d327fbde5d564c2/solr/core/src/java/org/apache/solr/schema/SchemaManager.java#L132

      As I understand this was introduced in SOLR-9832 and is useful to avoid accidentally reloading to an older version of the config. The problem is that in the solr core a listener is implemented to initiate a reload whenever a config change happens in ZK, this can be found here: https://github.com/apache/solr/blob/cfc953b6b906ef742bba57024d327fbde5d564c2/solr/core/src/java/org/apache/solr/core/SolrCore.java#L3140

      When updating the schema using the Schema API both of these reloads get triggered and this can result a strange bug, where not all the indexed documents are visible if the indexing is started just after the schema API returned.

      Attachments

        Issue Links

          Activity

            People

              asalamon74 Andras Salamon
              bszabo97 Bence Szabó
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h