exists() depends on exact FT.INFO error wording; an unrecognised "missing index" message makes create() never create the index (regression from #672)
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đá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
- 75/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc exists() và _MISSING_INDEX_ERROR_FRAGMENTS trong redisvl/exceptions.py, sau đó kiểm tra các bài kiểm thử cho trường hợp thiếu index và create(). Tái hiện cách diễn đạt của Valkey được mô tả trong issue và xác minh rằng exists() trả về False khi thiếu index nhưng vẫn phát sinh ngoại lệ với các lỗi khác; xác nhận rằng create() sau đó có thể tạo index.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Since #672 (released in 0.25.1), exists() decides whether an index is missing by matching the FT.INFO error text against _MISSING_INDEX_ERROR_FRAGMENTS. If a server words that error differently, exists() raises RedisSearchError instead of returning False, and because create() calls exists() first, the index is never created. Before #672, FT._LIST made the check independent of wording.
One server where this happens today is Valkey Search (tested on Amazon ElastiCache for Valkey 9.1.0), which replies Index with name '…' not found in database 0.
Cause
exists() treats an FT.INFO error as "missing index" only if it matches one of these, in redisvl/exceptions.py:
_MISSING_INDEX_ERROR_FRAGMENTS = (
"unknown index name",
"no such index",
"search_index_not_found",
"index not found",
)
Valkey Search words the error differently, so none of the fragments match and exists() re-raises:
FT.INFO no-such-index
(error) Index with name 'no-such-index' not found in database 0
("index not found" does not match because the index name sits between "index" and "not found".)
Before #672, exists() used FT._LIST, which works on Valkey, so this is a regression for Valkey users.
Reproduction
import asyncio
import redis.asyncio as redis
from redisvl.index import AsyncSearchIndex
async def main():
client = redis.Redis(host="<valkey-host>", port=6379) # Valkey + Valkey Search
idx = AsyncSearchIndex.from_dict(
{"index": {"name": "redisvl_repro_missing", "prefix": "redisvl_repro_missing"},
"fields": [{"name": "tag", "type": "tag"}]},
redis_client=client,
)
print(await idx.exists())
asyncio.run(main())
Actual:
redisvl.exceptions.RedisSearchError: Error while fetching redisvl_repro_missing index info: Index with name 'redisvl_repro_missing' not found in database 0
Expected: False, and create() then creates the index.
Impact
langgraph-checkpoint-redis's AsyncShallowRedisSaver.asetup() calls index.create(overwrite=False), so on a new Valkey database the checkpoint and checkpoint_write indexes are never created. Anything that queries those indexes (for example adelete_thread) then fails. Databases created before 0.25.1 are unaffected, because their indexes already exist.
Suggested fix
Either add that wording (for example "not found in database") to _MISSING_INDEX_ERROR_FRAGMENTS, or, independent of wording: when FT.INFO fails with an unrecognised ResponseError, fall back to checking FT._LIST (where the ACL allows it) before raising. That keeps #672's least-privilege benefit and stops create() from failing silently on unfamiliar error text.
Environment
- redisvl 0.28.0 (the fragment list on
mainis unchanged) - redis-py 8.1.0, RESP2
- langgraph-checkpoint-redis 0.5.2
- Amazon ElastiCache for Valkey 9.1.0 (Valkey Search), non-cluster mode
- Python 3.14
- 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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của redis/redis-vl-python
-
Vector field with index_missing=True cannot be createdCó thể đã có người làm @RaphaelFakhri đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
redis/redis-vl-python#770 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Add Python 3.15 supportCó thể đã có người làm @vishal-bala đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
redis/redis-vl-python#757 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 5 ngày
-
SearchIndex.drop_keys does not validate cluster hash-tag co-location (inconsistent with drop_documents)Có thể đã có người làm @Hashim1999164 đã nhận hôm nay. Đang mởbug good first issue index
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
redis/redis-vl-python#601 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
redis/redis-vl-python#300 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Migration executor cannot read an FT.AGGREGATE cursor over a RESP3 connection, raising KeyErrorCó thể đã có người làm @Kuang-xianxin đã nhận 42 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
redis/redis-vl-python#714 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của redis/redis-vl-python
Issue tương tự
-
comp/cli P3 type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
NousResearch/hermes-agent#141420 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vendor-pitch
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug llm p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
New tool: ZIPZAX Python Notebook StudioCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mởsubmission triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
kausalflow/tools#226 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100