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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 7.4
    • Component/s: SolrJ
    • Labels:
      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

            • Assignee:
              dpgove Dennis Gove
              Reporter:
              dpgove Dennis Gove
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: