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

BlockDirectoryCache release hooks do not work with multiple directories

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.4
    • 6.5, 7.0
    • hdfs
    • None

    Description

      https://github.com/apache/lucene-solr/blob/5738c293f0c3f346b3e3e52c937183060d59cba1/solr/core/src/java/org/apache/solr/store/blockcache/BlockDirectoryCache.java#L53

          if (releaseBlocks) {
            keysToRelease = Collections.newSetFromMap(new ConcurrentHashMap<BlockCacheKey,Boolean>(1024, 0.75f, 512));
            blockCache.setOnRelease(new OnRelease() {
              
              @Override
              public void release(BlockCacheKey key) {
                keysToRelease.remove(key);
              }
            });
          }
      

      If we're using the global block cache option and create multiple directories using the same factory, we will lose the release hook for the first directory. I think we can verify that by creating a server with multiple cores.

      Attachments

        Issue Links

          Activity

            People

              markrmiller@gmail.com Mark Miller
              mdrob Mike Drob
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: