Skip to content

Fix doctor on fresh clones and pull lock contention (knit) - #266

Merged
marc-merino merged 2 commits into
mainfrom
knit/fix-doctor-on-fresh-clones-and-pull-lock-contention
Oct 22, 2026
Merged

marc-merino merged 2 commits into
mainfrom
knit/fix-doctor-on-fresh-clones-and-pull-lock-contention

Conversation

@marc-merino

@marc-merino marc-merino commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Knit Bundle

View bundle

This PR is part of Knit bundle fix-doctor-on-fresh-clones-and-pull-lock-contention.

See the other review objects in this bundle:

Bundle id: fix-doctor-on-fresh-clones-and-pull-lock-contention
Bundle title: Fix doctor on fresh clones and pull lock contention

knit doctor, knit migrate and knit project list read every JSON file in
.knit/projects as a project, so the known-repos sidecar a fresh clone writes
there made doctor fail and could be rewritten by migrate. They now read only
*.project.json.

knit pull --bundles syncs each open bundle's landing plans on parallel
threads, and every sync takes the landing-sync file lock, which refuses a
second holder even within the same process. Bundles failed with "Another Knit
process is updating this state" naming the pull's own pid. Plan syncs within
one pull now queue behind a mutex; the file lock still guards other
processes.

Knit-Group: kg_20261022_2be55a
Knit-Bundle: fix-doctor-on-fresh-clones-and-pull-lock-contention
Knit-Group: kg_20261022_f4856b
Knit-Bundle: fix-doctor-on-fresh-clones-and-pull-lock-contention
@marc-merino
marc-merino merged commit f505efc into main Oct 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant