fix: discovery indexes the files of an index directory that a .codegraph link points to inside the repository
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by tracing file discovery and checking how query.IndexDirs reports the resolved index directory. Reproduce the race with a .codegraph link to cg-real while repeatedly running the indexing command. Done means discovery skips the resolved index directory and its store, and indexing no longer reads live store files.
索引モデルが issue の本文から書いたものです。
説明
What happens
Found while reviewing PR #374, which relates to #372. A test in #374 failed in 1 of 26 runs with this error, before its fixture was renamed:
lstat .../cg-real/store/OPTIONS-000008
File discovery skips .codegraph by name and skips names that start with a dot. It does not know that cg-real is the index. So it walks into the live Pebble store in cg-real/store. Discovery then races with Pebble's own file renames and deletes. The run can fail, or it can index store files.
What you expected instead
Discovery skips the resolved index directory and its store, as query.IndexDirs reports them, whatever their names are. Indexing through a .codegraph link to cg-real leaves the live store unread.
Steps to reproduce
- Create a repository with a directory named
cg-realthat holds the index. - Link the index:
ln -s cg-real .codegraph. - Run the indexing command repeatedly. The failure appeared in 1 of 26 runs.
A workaround is to name the link target with a leading dot, such as .cg-real. Discovery then skips it by name.
Version
Built from source at main.
Platform
macOS.
How did you install it?
Built from source
Languages in the affected repository
All languages.
Before submitting
- I searched existing issues and this is not a duplicate
- I checked the capability matrix and this is not a documented limitation
- This is not a security vulnerability
- 主要言語
- Go
- スター
- 0
- フォーク
- 0
- 平均マージ
- 7時間 42分
- マージ済み PR(30日)
- 111
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
seanb4t/codegraph-go のほかの issue
-
chore needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
seanb4t/codegraph-go#380 ·
メンテナーはふだん 1 日以内に返信
-
chore needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
seanb4t/codegraph-go#379 ·
メンテナーはふだん 1 日以内に返信
-
area:query chore needs-triage spec-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
seanb4t/codegraph-go#377 ·
メンテナーはふだん 1 日以内に返信
-
chore needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
seanb4t/codegraph-go#362 ·
メンテナーはふだん 1 日以内に返信
-
area:query bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
seanb4t/codegraph-go#355 ·
メンテナーはふだん 1 日以内に返信
seanb4t/codegraph-go の issue をすべて見る
似ている issue
-
Add iterate GmbH domains to a dedicated list and include it in company and developer categoriesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
v2fly/domain-list-community#4307 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
notify: voice_queue rows are deleted only at startup, so a hub that stays up grows it without boundオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mattabate/life-distributable#232 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信