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

HashJoinStream's use of String::hashCode results in non-matching tuples being considered matches

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.0
    • 7.4
    • SolrJ
    • None

    Description

      The following strings have been found to have hashCode conflicts and as such can result in HashJoinStream considering two tuples with fields of these values to be considered the same.

      "MG!!00TNGP::Mtge::".hashCode() == "MG!!00TNH1::Mtge::".hashCode() 

      This means these two tuples are the same if we're comparing on field "foo"

      {
        "foo":"MG!!00TNGP::Mtge::"
      }
      {
        "foo":"MG!!00TNH1::Mtge::"
      }
      

      and these two tuples are the same if we're comparing on fields "foo,bar"

      {
        "foo":"MG!!00TNGP"
        "bar":"Mtge"
      }
      {
        "foo":"MG!!00TNH1"
        "bar":"Mtge"
      }

      Attachments

        1. SOLR-12355.patch
          10 kB
          Dennis Gove
        2. SOLR-12355.patch
          7 kB
          Dennis Gove

        Activity

          People

            dpgove Dennis Gove
            dpgove Dennis Gove
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: