Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

SearchIndex.drop_keys does not validate cluster hash-tag co-location (inconsistent with drop_documents)

Đang mở Phù hợp với người mới
#601 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

@Hashim1999164 đang làm issue này rồi.

Từ ngày 18/10/2026.

  • #614 của @algojogacor — đã đóng, không merge
  • #774 của @Hashim1999164 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python, redis
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu tại redisvl/index/index.py, ở SearchIndex.drop_keys (khoảng dòng 826), và so sánh nó với drop_documents (khoảng dòng 840), bao gồm cả việc xác thực hash tag RedisCluster hiện có. Đảm bảo cả hai phương thức có hành vi cluster giống hệt nhau: các key cross-slot không hợp lệ phải raise ValueError đã nêu trước khi delete được gọi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug good first issue index

Current behavior

SearchIndex.drop_documents (redisvl/index/index.py:840) explicitly validates that all keys share a hash tag before calling delete:

if isinstance(self._redis_client, RedisCluster) and not _keys_share_hash_tag(keys):
    raise ValueError("All keys must share a hash tag when using Redis Cluster.")
return self._redis_client.delete(*keys)

SearchIndex.drop_keys (redisvl/index/index.py:826) does not. On a clustered Redis Enterprise database, a multi-key DEL whose keys do not all hash to the same slot raises CROSSSLOT from the server — but only some redis-py client modes surface this cleanly. In others the call partially succeeds or fails opaquely.

Proposed change

Apply the same hash-tag check in drop_keys that drop_documents already applies, or factor the check into a shared helper called by both. Behavior on cluster should be identical between the two methods.

Why this surfaces

SemanticCache.drop() uses drop_keys under the hood for the keys= argument path and uses drop_documents for the ids= argument path. The two argument paths therefore behave differently on cluster, which is a footgun for customers building invalidation jobs that take whichever shape comes from their query results.

Notes

Surfaced while writing a scoped semantic caching architecture spec.

Ngôn ngữ chính
Python
Star
431
Fork
107
Merge trung bình
5 ngày 17 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của redis/redis-vl-python

Tất cả issue của redis/redis-vl-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.