Repository navigation
Keep a file index walk's end and its result in one state - #514
Merged
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #473
Summary
⌘P 파일 index가 실패한 walk를 한 번 답한 직후의 질의에서 새 walk를 시작하지 않고
Indexing만 답할 수 있던 경쟁을 없앱니다.hided/src/index.rs의 entry는 결과(data)와 진행 중 표시(building)를 따로 들고 있었습니다. walk thread는 결과를 먼저 쓰고, guard가 drop될 때building을 내렸습니다. 그 사이에 온 질의는 실패를 답하고 결과를 비웠고, 다음 질의는 결과가 비었지만building이 아직 켜져 있어 walk를 시작하지 않은 채Indexing을 답했습니다. test에서는 그 다음 poll이 다른 walk(빈 목록)를 시작해entries == ["a.txt"]가 실패합니다(242행, CI Linux 2회).Empty,Walking,Walked,Failed)로 바꿨습니다. walk의 끝과 결과는 한 번의 변경입니다. walk가 panic하거나 thread가 시작되지 못하면Walkguard가Empty로 되돌려, 다음 질의가 다시 walk합니다.a_walk_that_panics_leaves_the_index_to_walk_again: 다시 쓴 panic 경로를 지킵니다.Review
hided/src/index.rs-Walkguard는finish로 결과를 쓰면 disarm되고, 끝나지 못한 경우에만Empty로 되돌립니다. 다른 walk가 시작된 뒤 앞선 guard가 새 walk의 상태를 지우는 일이 없도록 한 구조입니다.rank)은 이전처럼 lock 밖에서 합니다(Arc<Walked>만 복사).Evidence
yes14개) 아래 400회 반복해 실패 0. 수정 전 같은 조건 400회도 실패 0이라, 좁은 창은 로컬에서 재현되지 않았고 넓힌 창으로 원인을 확인했습니다.scripts/verify-cargo.sh lint통과.