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

CloudSolrServer URL cache update race

    XMLWordPrintableJSON

Details

    Description

      In CloudSolrServer.request, urlLists (and the like) is updated if lastClusterStateHashCode is different from the current hash code of clusterState. However, each time this happen, only the cache entry for the current collection being requested is updated. In the following condition this causes a race:

      query collection A so a cache entry exists
      update collection A
      query collection B, request method notices the hash code changed and update cache for collection B, updates lastClusterStateHashCode
      query collection A, since lastClusterStateHashCode has been updated, no update for cache for collection A even though it's stale

      Can fix one of two ways:
      1. Track lastClusterStateHashCode per collection and lazily update each entry
      2. Every time we notice lastClusterStateHashCode != clusterState.hashCode(),
      2a. rebuild the entire cache for all collections
      2b. clear all current cache for collections

      Attachments

        1. SOLR-5263.patch
          12 kB
          Mark Miller

        Activity

          People

            markrmiller@gmail.com Mark Miller
            mewmewball Jessica Cheng Mallet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: