Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2801

Incorrect equals() implementation in IdGenerationMarker could cause data missing in the commit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 4.2.RC2
    • 4.2, 5.0-M1
    • Core Library
    • None

    Description

      IdGenerationMarker class uses parent id hash as a data source for the equals() method.
      This could cause severe problems like data missing in the commit in case of the hash collision in two ids and usage of the OpIdFactory.ReplacementAwareObjectId id implementation.

      There's already a commit that is part of CAY-2777 fix, that significantly reduces risk of this problem:
      https://github.com/apache/cayenne/commit/53c9408e026d926601baf6e68b9761489c273397

      See also this mail thread: https://lists.apache.org/thread/2hdsn7vzdbbsgzvjt9mxwxkfo81m79wq

      Attachments

        Issue Links

          Activity

            People

              ntimofeev Nikita Timofeev
              ntimofeev Nikita Timofeev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: