Skip to content

Conversation

ScottDugas
Copy link
Collaborator

@ScottDugas ScottDugas commented Sep 11, 2025

This fixes ResolvedKeySpace.equals and hashCode so that they follow the spec and are consistent.
Notably there were a few issues:

  • They did not correctly handle KeyType.BYTES
  • They disagreed about what data to use (hashCode used to look at the PathValue, while equals looked at the value)
  • PathValue did not implement equals/hashCode
  • The remainder was not included.
  • KeySpacePathImpl redundantly checked the value from the directory
  • It did not check the parent of the ResolvedKeySpacePath.

Fixes: #3594

@ScottDugas ScottDugas added the bug fix Change that fixes a bug label Sep 11, 2025
@ScottDugas ScottDugas marked this pull request as ready for review September 16, 2025 16:12
@ScottDugas ScottDugas requested review from ohadzeliger and removed request for alecgrieser September 17, 2025 19:50
This will be useful when comparing paths, because they can validate the parent, and don't care about the directiory's other children.
@ScottDugas ScottDugas merged commit 7b23ace into FoundationDB:main Oct 17, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug

2 participants