Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7891

Default LRUType of LruTaxonomyWriterCache should be guaranteed to be correct

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.4, 6.4.1, 6.4.2, 6.5, 6.5.1, 6.6
    • 7.1, 8.0
    • core/other
    • None
    • New, Patch Available

    Description

      LruTaxonomyWriterCache uses LRUType.LRU_HASHED by default. This has a very small but non-zero chance of producing incorrect results due to collisions in the longHashCode of FacetLabel. If such a collision occurs, then an affected document will get an incorrect facet.

      This has happened to us in production. While it is a rare occurrence, the consequences could be significant, and it was not immediately obvious what caused the problem. Therefore I think it is better if the default is changed to LRUType.LRU_STRING, which is guaranteed to be correct.

      I will add a patch containing this change as well as a test for the issue.

      Attachments

        1. LUCENE-7891.patch
          5 kB
          Jan-Willem van den Broek

        Activity

          People

            Unassigned Unassigned
            jwbroek Jan-Willem van den Broek
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: