Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4250

Missing arrayOffset in FBUtilities.hash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Urgent
    • Resolution: Fixed
    • 1.1.1
    • None
    • None
    • Critical

    Description

      In CASSANDRA-3869, FBUtilities.hash was optimised to use the backing byte array if there is one. However, there is a missing +arrayOffset in the offset parameter.

      This can cause incorrect hashes resulting in data going to the wrong place, etc.. I haven't observed any errors directly attributable to this so maybe we are lucky and all backing arrays start at 0 but this could cause data loss in the worst case.

      Attachments

        1. CASSANDRA-4250-v1.patch
          0.6 kB
          Richard Low

        Activity

          People

            richardlow Richard Low
            richardlow Richard Low
            Richard Low
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: