A symbol-stage re-chunk leaves callers that sort before a new definition declined
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
- 45/100
Hướng nghiên cứu
Read ingest_pass._maybe_rechunk, _rechunk_batch in reconcile.heal, and the edge-stage inputs in server/code/domain/extract/extractor_stamp.py; trace how batches change the name table and how dependents are normally re-resolved. Check existing tests for rechunking and dependent resolution, then add coverage for both a newly added name and a removed name. Done means callers reflect the final migrated name table after rechunking completes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Company
Independent
Component
Code index
Describe what's wrong
When an extractor change moves the symbol stage, the re-chunk (ingest_pass._maybe_rechunk) re-derives every live file in sorted path order, in batches through reconcile.heal (_rechunk_batch). STAGE_INPUTS["edge"] = ("symbol",) (server/code/domain/extract/extractor_stamp.py), so the edge stage re-runs with it, and each file's edges resolve against the name table as it stands when that file's batch runs.
If the new symbol extraction gains a name in some file (a definition the old extractor missed), a caller in another file whose path sorts before it is re-derived while the name is still absent, and its call site is declined unresolved. The definer's batch then adds the name, but nothing re-resolves the caller: the re-chunk does not run the dependents step that a commit and a reconcile heal run over what they changed, and the caller's blob did not move, so no later reconcile finds it stale. The site stays declined until a commit touches the calling file.
A stage move that drops a name has the mirror effect: a caller earlier in path order keeps its edge into the definition until the definer's batch tombstones the symbol, and the edge is then left pointing at a retired symbol.
Does it reproduce on the latest release or main?
Not checked
How to reproduce
- Index a namespace whose
a/caller.cppcallshelper(), defined inb/lib.cppin a form the current symbol extractor does not emit, so the call site is declinedunresolved. - Change the symbol extractor so it emits
helper, which moves the symbol stage's stamp. - Let the worker's re-chunk finish (
code_index_statekeyextractor_stampreaches its target). a/caller.cppstill has its declinedhelpersite and no edge intohelper; re-ingestinga/caller.cppby hand binds it.
Expected behavior
After a stage migration completes, every caller resolves against the name table the migration produced, as it would after a full backfill with the new extractor.
Environment
main, code index fast tier.
Related issues and pull requests
Related: https://github.com/ClickHouse/loom/issues/1680
How this was found
An AI tool found it, and I have not reproduced it myself
Additional context
Running the per-commit dependents step after each re-chunk batch is the obvious fix and the wrong one: a whole-repository migration changes many names per batch, so every batch would hit code_closure_repair_max_names (500) and fill code_ingest_dependents_pending_max (5000). One dependents sweep after the cursor completes, over the union of what the batches added and removed, or a second edges-only pass over the files that hold declined sites or edges into names the migration changed, fits the shape better.
Redaction
- I removed tokens, keys, passwords and personal or customer data from everything above.
- Ngôn ngữ chính
- Python
- Star
- 263
- Fork
- 47
- Merge trung bình
- 14 giờ 21 phút
- Pull request đã merge (30 ngày)
- 873
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc 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 ClickHouse/loom
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
ClickHouse/loom#2014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Options of loom period-digest, reextract, reconcile-status and demote-activity-narration print no help textCó thể đã có người làm @VanshajPoonia đã nhận hôm nay. Đang mởbug good first issue help wanted up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ClickHouse/loom#1988 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A compiler-tier checkout fetch from a shallow mirror never records its headCó thể đã có người làm @KaloyanNaumov đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
ClickHouse/loom#2016 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Delta workers fetch the compiler-tier checkout under a hard-coded 600 s limitCó thể đã có người làm @KaloyanNaumov đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
ClickHouse/loom#2012 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
loom participant retire cannot retire an orphaned participant after container replacement or host rebootCó thể đã có người làm @l0K1ngg đã nhận hôm nay. Đang mởbug help wanted up-for-grabs
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
ClickHouse/loom#2007 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ClickHouse/loom
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TigreGotico/orthography2ipa#2950 ·
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Unstructured-IO/unstructured#4876 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openfoodfacts/openfoodfacts-python#579 ·
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 90/100
fairagro/m4.2_sql_to_arc#388 ·
Maintainer thường phản hồi trong vòng 1 ngày