Ordered loader: a page-capping provider loses a moved row from a joined window after refetch
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
- 18/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
- Lĩnh vực
- databases
Hướng nghiên cứu
Start with the pinned it.fails test in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts, which encodes the eight-step history against a provider with pageCap 2. Run it to see the failure 'window after refetch at step 3 was []; expected [7]', then trace where the ordered loader's repair path treats a short page as exhaustion. Read PR #2154 on branch fix-query-db-refetch-ordered-gap first. Done when the test passes without the it.fails marker and the refetch oracle's generated scenarios accept pageCap.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
With a provider that returns fewer rows than a request's limit (a page cap), an on-demand joined ordered window can lose a row after a refetch. The row's order changed, and the loader's own repair drops it. A short reply does not prove that the source is exhausted (glossary), so the loader must keep reading.
Reproduction
The pinned witness is a capped provider keeps a moved row in the window after a refetch (known loader defect) in packages/query-db-collection/tests/refetch-ordered-prefix-oracle.test.ts (branch fix-query-db-refetch-ordered-gap, PR #2154). It is an it.fails test today.
- Provider: cursor encoding,
pageCap: 2. - Query:
rank desc,offset 1,limit 2, LEFT-joined marker filter. - Initial rows: id 0 (rank 1, marked), id 1 (rank 0, unmarked).
- History:
- Mark id 7.
- Upsert id 2 at rank 1.
- Upsert id 7 at rank 0.
- Refetch.
- Delete id 3.
- Invalidate.
- Upsert id 3 at rank 1.
- Upsert id 0 at rank 0.
Failure: window after refetch at step 3 was []; expected [7].
Scope
This reproduces on main, through the loader's own repair. It is separate from #2136. The query-db refetch oracle's generated campaigns use an uncapped provider because of this defect. A page-capped trace together with a peer live query also fails (found while #2154 was reviewed). That trace fails the same way with the loader's first-page skip disabled.
Suggested witness and owner
- Owner: the ordered loader. The repair and continuation path must treat a short page as "not exhausted".
- Witness: flip the pinned
it.failstest, then addpageCapto the query-db refetch oracle's generated scenario.
This issue was written by Isaac.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.9k
- Fork
- 277
- Merge trung bình
- 22 giờ 54 phút
- Pull request đã merge (30 ngày)
- 236
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ó 4/5 3-5 ngày Mức phù hợp với người mới 22/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 12/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 8/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày 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
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 5/100
TanStack/db#2186 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
[测试] 等待仓库加载后再记录多仓库排序基线Có thể đã có người làm @myot233 đã nhận hôm nay. Đang mở
Độ 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
-
area:arcade p3-medium ready-for-agent testing type:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
fderuiter/deruiter.dev#2369 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:devenv origin:agent type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
overengineeringstudio/effect-utils#1949 ·
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 76/100
ccch1mneyyy/dsh-TUI#1631 ·
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
MiniMax-AI/minimax-code#507 ·
Maintainer thường phản hồi trong vòng 1 ngày