[backport 3.4] memtx: use index definition's key_def for point hole comparisons#11484
Merged
sergepetrenko merged 8 commits intorelease/3.4from May 14, 2025
Merged
[backport 3.4] memtx: use index definition's key_def for point hole comparisons#11484sergepetrenko merged 8 commits intorelease/3.4from
key_def for point hole comparisons#11484sergepetrenko merged 8 commits intorelease/3.4from
Conversation
We combine the index and tuple hash for point holes in a non-trivial way in more than one place — let's encapsulate the combination logic in a separate function for future changes. Needed for #10159 Needed for #11292 NO_CHANGELOG=<refactoring> NO_DOC=<refactoring> NO_TEST=<refactoring> (cherry picked from commit b6cabab)
It is safe to remove an object from its list, even if the list is empty — let's always remove point holes from their rings to simplify the code. We will use this to further separate the point hole storage deletion from the point hole item deletion. Needed for #10159 Needed for #11292 NO_CHANGELOG=<refactoring> NO_DOC=<refactoring> NO_TEST=<refactoring> (cherry picked from commit 171412a)
Currently, we assume that point hole equivalence classes are defined by their keys' binary (MsgPack) representation, and use `memcmp` for comparison. However, this is not true in the case of numeric key definitions and collations. To fix this, let's use the corresponding index's key definition for comparison. Storing the key length then becomes redundant, so let's drop it. Closes #10159 Closes #11292 NO_DOC=<bugfix> (cherry picked from commit b2fc501)
key_def for point hole comparisonskey_def for point hole comparisons
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.
(This PR is a backport of #11388 to
release/3.4to a future3.4.1release.)This patchset fixes the incorrect assumption that point hole equivalence classes are defined by
their keys' binary (MsgPack) representation.
Closes #10159
Closes #11292