Repository navigation
Validate shared hash tags in drop_keys on Redis Cluster - #774
Open
Hashim1999164 wants to merge 1 commit into
Open
Hashim1999164 wants to merge 1 commit into
Hashim1999164 wants to merge 1 commit into
Conversation
Hashim1999164
force-pushed
the
fix/drop-keys-cluster-hash-tag
branch
from
October 18, 2026 21:17
1c8c783 to
e23339f
Compare
Match drop_documents so SemanticCache keys= and ids= paths fail the same way when keys span slots.
Hashim1999164
force-pushed
the
fix/drop-keys-cluster-hash-tag
branch
from
October 19, 2026 04:17
e23339f to
e878ee9
Compare
Collaborator
|
Hi, thanks for your contribution! Can you rebase onto the latest |
This branch has not been deployed
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.
Summary
Fixes #601 by applying the same Redis Cluster hash tag check in
SearchIndex.drop_keysandAsyncSearchIndex.drop_keysthatdrop_documentsalready uses.On cluster, multi key
drop_keysnow raisesValueErrorwhen keys do not share a hash tag, so theSemanticCache.drop(keys=...)path matchesdrop(ids=...)instead of failing later or partially.Test plan
drop_keyscluster validation success, failure, and non cluster skipNote
Medium Risk
Changes deletion error semantics on Redis Cluster for multi-key
drop_keys(fail-fastValueErrorinstead of per-key unlink or ambiguous partial behavior), which may surface mis-tagged callers that previously appeared to succeed.Overview
Aligns Redis Cluster behavior for bulk
drop_keyswithdrop_documentson bothSearchIndexandAsyncSearchIndex.For a list of keys on cluster, the methods now call
_keys_share_hash_tagbefore any batchedUNLINKwork and raiseValueErrorwith the same message asdrop_documentswhen hash tags differ. Single-key and non-cluster paths are unchanged. Docstrings note the cluster requirement and document the new raise.Unit tests extend cluster validation coverage to sync/async
drop_keys(success, failure, and no validation on standalone Redis).Reviewed by Cursor Bugbot for commit e878ee9. Bugbot is set up for automated code reviews on this repo. Configure here.