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

LUCENE-10431: Don't include rewriteMethod in MTQ hash calculation #727

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

romseygeek
Copy link
Contributor

BooleanQuery assumes that its children's hashcodes are stable, and has some
assertions to this effect. This did not apply to MultiTermQuery, which has a
mutable RewriteMethod member variable that was included in its hash calculation.
Changing the rewrite method would change the hash, leading to assertion failures
being tripped. This commit removes rewriteMethod from the hash calculation,
meaning that the hashcode will be stable even under mutability.

@romseygeek romseygeek self-assigned this Mar 3, 2022
@romseygeek romseygeek merged commit 5e539bc into apache:branch_9x Mar 4, 2022
@romseygeek romseygeek deleted the mtq/fix-hash-9x branch March 4, 2022 11:54
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.

None yet

1 participant