[Fix] Correct RECLAIM_KEY digest in remove_kernel#240
Merged
rhdong merged 1 commit intoNVIDIA-Merlin:masterfrom Feb 18, 2026
Merged
[Fix] Correct RECLAIM_KEY digest in remove_kernel#240rhdong merged 1 commit intoNVIDIA-Merlin:masterfrom
rhdong merged 1 commit intoNVIDIA-Merlin:masterfrom
Conversation
Set `RECLAIM_KEY` digest to `reclaim_digest` instead of `empty_digest`. This prevents probing kernels from mistakenly identifying reclaimed slots as empty candidates, reducing unnecessary memory accesses and improving performance.
Documentation previewhttps://nvidia-merlin.github.io/HierarchicalKV/review/pr-240 |
Member
Member
|
/blossom-ci |
Member
|
Hi @jiashuy , the CI doesn't work. Could you help check it? Thanks! |
Member
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.
Description: This PR fixes a performance issue in remove_kernel and remove_kernel_v2 where the digest for a RECLAIM_KEY was incorrectly set to empty_digest().
Issue: When a key is removed and marked as RECLAIM_KEY, setting its digest to empty_digest causes the probing logic to falsely identify the slot as a potential candidate for an empty key. This triggers unnecessary memory accesses (loading the Key) to confirm the slot status, only to discover it is actually a RECLAIM_KEY and continue probing.
Fix: Updated the code to set the digest to reclaim_digest() instead of empty_digest. This allows the SIMD filter to correctly distinguish between true Empty slots and Reclaimed slots, avoiding redundant Key loads and improving probing efficiency.