query-db refetch oracle: a window row is missing from the source Collection after a held delete is released
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start with packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts and run the supplied seed and path using the reproduction command. Trace the held delete, refetch, and release through the query-db code and compare the source Collection with the ordered window after release. Done means the reproduced history satisfies the coverage law, with the relevant tests passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The query-db refetch oracle fails on main at bd10e564e for one random seed. The history has a held delete, two upserts, a refetch, and the release of the held delete. After it, a row sorts inside the live window, but the source Collection does not have it.
Reproduction
pnpm install
pnpm --filter @tanstack/db-ivm build
pnpm --filter @tanstack/db build
pnpm --filter @tanstack/db-sqlite-persistence-core build
cd packages/query-db-collection
TANSTACK_DB_ORACLE_SEED=-116668131 \
TANSTACK_DB_ORACLE_PATH="71:3:0:2:1:1:2:3:0:5:5:4:0:0:0:0:3:1:2:4:4:7" \
TANSTACK_DB_ORACLE_PROPERTY=query-db.refetch-ordered-prefix \
npx vitest run tests/refetch-ordered-prefix-oracle.test.ts
The random campaign of query-db.refetch-ordered-prefix found the seed. In my runs, approximately 1 of 3 random campaigns failed.
Shrunk counterexample
{
"scenario": { "encoding": "cursor", "functionKey": false, "terms": 1, "orderKey": "rank", "limit": 1, "offset": 0 },
"initial": [
{ "id": 0, "rank": 0, "marked": false },
{ "id": 1, "rank": 0, "marked": false }
],
"history": [
{ "type": "hold", "kind": "delete", "id": 1 },
{ "type": "upsert", "id": 2, "rank": 0 },
{ "type": "upsert", "id": 1, "rank": 1 },
{ "type": "refetch" },
{ "type": "release" }
]
}
Failure
coverage after release at step 4: rows [{"id":2,"rank":2,"label":"a2"}] sort at or before the window's end but are [null] in the source Collection
The coverage law applies after the release of the held write. Every row that sorts at or before the end of the served window must then be in the source Collection. Here, row 2 sorts inside the window, but the source Collection does not contain it.
Scope
- The failure also occurs with the live-query sources of #2194 and of its merge base, so it does not come from #2194.
- I did not find the cause. The shrunk history has a held delete of row 1 while row 2 is inserted, row 1 moves, and a refetch runs. That points at the refetch and the release of the held write, possibly near #2206.
This issue was written by Isaac.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.9k
- Fork
- 277
- Merge trung bình
- 17 giờ 54 phút
- Pull request đã merge (30 ngày)
- 226
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 TanStack/db
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
SQLite persistence: a sync transaction whose durable write fails still changes the public CollectionĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sqlite-persistence: leader term write on every page load delays reading rowsCó thể đã có người làm @KyleAMathews đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kunchenguid/gh-axi#220 ·
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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
prerender: wait for env-runner worker readiness before crawlingCó thể đã có người làm @sarankumar1325 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày