Object TTL update sends `objectTTLConfig`, while the server spells it `objectTtlConfig`
Maintainer thường phản hồi trong vòng 1 ngà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
- 62/100
Hướng nghiên cứu
Đọc năm vị trí xuất hiện của khóa TTL trong weaviate/collections/classes/config.py, đặc biệt là logic merge quanh các dòng 1748-1750. Thêm một regression test để cố định cách viết ở phía server và objectTtlConfig, rồi chạy các test liên quan cùng với python -m pytest test/; hoàn tất khi PUT chứa một block duy nhất có tên chính xác và giữ nguyên hành vi hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
collection.config.update(object_ttl_config=...) merges the update into the schema it fetched, under a different key than the one the server returns. The server names the field objectTtlConfig, in schema.json#L1824 and in the Go tag at class.go#L50. The client writes objectTTLConfig here:
The PUT carries both blocks:
from weaviate.classes.config import Reconfigure
from weaviate.collections.classes.config import _CollectionConfigUpdate
stored = {"objectTtlConfig": {"enabled": True, "deleteOn": "expiresAt", "defaultTtl": 3600, "filterExpiredObjects": False}}
update = _CollectionConfigUpdate(
object_ttl_config=Reconfigure.ObjectTTL.delete_by_date_property(property_name="customDate", filter_expired_objects=True)
)
print(update.merge_with_existing(stored))
# main 38f30c1
{'objectTtlConfig': {'enabled': True, 'deleteOn': 'expiresAt', 'defaultTtl': 3600, 'filterExpiredObjects': False}, 'objectTTLConfig': {'enabled': True, 'filterExpiredObjects': True, 'deleteOn': 'customDate', 'defaultTtl': 0}}
The update still reaches the server for two reasons. Go's encoding/json matches keys without regard to case, and the client puts its key last, so it overlays the stale block. With the two blocks in the other order, a live server stores nothing from the update:
# raw PUT /v1/schema/<class> against semitechnologies/weaviate:1.39.7, update block {'enabled': True, 'filterExpiredObjects': True}
A both blocks, objectTTLConfig last 200 stored filterExpiredObjects=True
B both blocks, objectTTLConfig first 200 stored filterExpiredObjects=False
C only objectTtlConfig, fully merged 200 stored filterExpiredObjects=True
A rename of the five occurrences to objectTtlConfig sends one block and stores the same state as main. python -m pytest test/ gives 526 passed, as on main without it, and the five TTL integration tests pass against 1.39.7. On top of #2171's head the PUT carries one block with defaultTtl: 3600, and test/ gives 496 passed, as on that head alone. No test pins either spelling today.
#2171 lists this mismatch as awaiting a maintainer decision. Related: #2170.
@g-despot do you want the rename, with a test that pins objectTtlConfig, as a pull request? cc @dirkkul, as the key came in with ef6e0e3.
- Ngôn ngữ chính
- Python
- Star
- 228
- Fork
- 161
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 12
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 weaviate/weaviate-python-client
-
Batch: re-added rate-limited objects stay in results.objs.all_responses as errorsCó thể đã có người làm @inchang-ing đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
weaviate/weaviate-python-client#2179 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
insert_many silently discards vectors if they're NumPy arraysCó thể đã có người làm @tibor-reiss đã nhận 822 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
weaviate/weaviate-python-client#1002 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Client-side batching: wholesale chunk failures are reported under chunk-local indices, so errors collide and describe the wrong objectsCó thể đã có người làm @feiiiiii5 đã nhận 30 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 15/100
weaviate/weaviate-python-client#2165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[HTTPXodus] Consider migrating from httpx to httpx2 (the actively maintained fork)Có thể đã có người làm @ProgrammerPlus1998 đã nhận 44 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
weaviate/weaviate-python-client#2154 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fetch_objects(limit=0) returns a default page of objects instead of noneCó thể đã có người làm @databyjp đã nhận 3 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
weaviate/weaviate-python-client#2150 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của weaviate/weaviate-python-client
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ianktoo/project-monitor#14 ·
-
A wrong descriptor checksum is refused with the right one, also for an xprv or WIF descriptorĐang mởsecurity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
btclib-org/btclib-wallet#478 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
btclib-org/btclib#2727 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue lead variant:container
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
radialmonster/orf-cleanroom#10 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
gdsa opencode: keep-alive cleanup trap fails with 'keepalive_pid: unbound variable'Có thể đã có người làm @darribas đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100