Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid hash code collisions in build memory #360

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Jimilian
Copy link
Contributor

@Jimilian Jimilian commented May 2, 2018

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.

@Jimilian
Copy link
Contributor Author

Jimilian commented May 2, 2018

{event1, null, 2},
{event1, event1, 1},
{event2, event2, 1},
{event1, event2, 2},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants