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

Schema API changes return success before all cores are updated

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0
    • None

    Description

      See SOLR-6137 for more details.

      The basic issue is that Schema API changes return success when the first core is updated, but other cores asynchronously read the updated schema from ZooKeeper.

      So a client application could make a Schema API change and then index some documents based on the new schema that may fail on other nodes.

      Possible fixes:
      1) Make the Schema API calls synchronous
      2) Give the client some ability to track the state of the schema. They can already do this to a certain extent by checking the Schema API on all the replicas and verifying that the field has been added, though this is pretty cumbersome. Maybe it makes more sense to do this sort of thing on the collection level, i.e. Schema API changes return the zk version to the client. We add an API to return the current zk version. On a replica, if the zk version is >= the version the client has, the client knows that replica has at least seen the schema change. We could also provide an API to do the distribution and checking across the different replicas of the collection so that clients don't need ot do that themselves.

      Attachments

        1. SOLR-6249_reconnect.patch
          12 kB
          Timothy Potter
        2. SOLR-6249_reconnect.patch
          6 kB
          Timothy Potter
        3. SOLR-6249.patch
          50 kB
          Timothy Potter
        4. SOLR-6249.patch
          43 kB
          Timothy Potter
        5. SOLR-6249.patch
          41 kB
          Timothy Potter

        Issue Links

          Activity

            People

              thelabdude Timothy Potter
              gchanan Gregory Chanan
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: