Avoid hash code collisions in build memory - #360
Open
Jimilian wants to merge 3 commits into
Open
Conversation
That solves a problem of hash collision for non-equal objects.
Contributor
Author
rsandell
reviewed
Jul 10, 2018
| {event1, null, 2}, | ||
| {event1, event1, 1}, | ||
| {event2, event2, 1}, | ||
| {event1, event2, 2}, |
Member
There was a problem hiding this comment.
Should be one, if they have the same hashcode, they essentially are the same event even though it is different object instances.
An event might be just one instance when a series of builds are triggered, but when those builds are restored from disk the events in those builds will be different instances, and the quick way to see that two instances respresents the same event is to use the hashCode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Time to time we observe very strange behaviour - when completely new patchset is triggered, it already has some finished builds in the history. We assume that it may be related due to TreeMap nature of BuildMemory.