Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4083

RelTraitSet failed to canonize traits

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.24.0
    • core
    • None

    Description

      RelTraitSet#plus uses FlatLists and ImmutableList. They have different hash algorithms, and they are all different classes from RelTraitSet. The RelTraitSet equality requires the other object must be RelTraitSet too, and the HashMap#get(key) uses key.equals() to check equality, instead of the other way. In case we pass RelTraitSet as the search key to cache, but the cached entry has key with FlatLists or ImmutableList, we may fail to find the cached RelTraitSet. Due to this, using == to check traitSet equality may fail, even they have same traits.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            hyuan Haisheng Yuan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment