Repository navigation
Description
The fleet's shared bare clone /worktrees/.master.git is a tree:0 promisor clone with gc.auto=0, so every lazy fetch writes its own pack and nothing consolidates. The daily groeneai-bare-repack.timer is the only thing keeping it bounded, and it does work: 509 -> 15 (09-19), 729 -> 2 (09-20), 829 -> 2 (09-21), 795 -> 2 (09-22).
It has now been skipped on two consecutive firings.
What happens
[2026-09-23T05:06:44Z] prefill walk: rc=128 duration=2016s other_lines=1
prefill: fatal: Failed to traverse parents of commit 1ec7ca1cb36c9a807d75bdb06b88fc2f2b03c4b6
[2026-09-23T05:06:48Z] WARNING: prefill walk failed (rc=128) - skipping the repack: it would die on
the same object. Fix the object/worktree named above, then re-run.
[2026-09-24T05:31:40Z] prefill walk: rc=128 duration=3417s other_lines=1 (the SAME object)
The skip is the right call (bare-repack.sh:88-95): repack -a -d pass 2 walks the same roots without lazy-fetching, so it would die on the same object after about an hour of promisor-set construction. The consequence is that the repack now never runs.
Root cause, measured read-only with GIT_NO_LAZY_FETCH=1
1ec7ca1cb36c...("Keep a const threshold column const in PartialSortingTransform", authored by the fleet) is present locally and is not ongroeneai/ClickHouse(commit API 422, never pushed).- Its single parent
c9d82eb90d6d...is absent locally:cat-file -edoes not return within 120s, andfor-each-ref --containsprints git's ownerror: Could not read c9d82eb9.... 1ec7ca1cis reachable only from reflogs, never from a ref:logs/refs/heads/groeneai/fix-stid-1499-2393-finishsorting-columnsparse(the branch ref itself is healthy, at29ddff7b) and the live worktree/worktrees/tasks/2026-07-04-ci-p0-logicalerror-bad-cast-columnspar'slogs/HEAD. Both recordreset: moving to 29ddff7b...at 2026-09-21 14:19Z, which is what orphaned it.- The 09-22 repack is what dropped the parent:
dangling_reflog_warningsin the same log jumps 1,497 (09-22) to 4,531 (09-23). - The pre-fill exists precisely to refill such holes by lazy fetch (
bare-repack.sh:72-79), and it could not fill this one, twice.
Why it is permanent rather than self-clearing. Git's own remedy for reflog entries pointing at commits unreachable from the tip is gc.reflogExpireUnreachable (default 30 days), applied by git gc / git maintenance. On this store gc.auto=0, maintenance.auto unset, both gc.reflogExpire* unset, core.logAllRefUpdates=true. So reflogs accumulate and nothing ever expires them, and one orphaning git reset in one worktree disables consolidation indefinitely.
Cost while it stays skipped
- packs
1,359(09-23 04:33Z) ->2,579(09-24 04:34Z) ->3,264(09-24 17:38Z), about +1,250/day, of which 3,262 are.promisor /worktreesat 85%, which is the worktree-GC's own pressure-reap trigger- each skipped firing still pays the full pre-fill walk: 2,016s, then 3,417s, and it grows with the pack count
- left alone this returns to the 82,142-pack / 2.6 TB state that cost five separate investigations
What is not urgent, so that nothing is scheduled against a false emergency: the pre-push-gate.sh branch-hygiene block that started this workstream is fixed and is not at risk. Measured today, _budget=20 (:347, growing +3 per completed merge-base at :637) and the gate's own 83-ref merge-base costs 2.32 / 2.36 / 2.37s, so blocking would need N(C-3) > 16 with C < 3s, which no N satisfies. C=3s is about 34-38k packs, roughly 25-28 days away at the current rate.
Why I am asking rather than fixing
Both candidate remedies are outside what a slot session may do:
- Store-side (restore the one object, or expire the two orphaning reflog entries) is a write to the shared bare clone, which is attended-operator-only on this box, because a killed write strands a lock fleet-wide. As evidence that a killable session should not attempt it: my read-only
git reflog expire --dry-run --expire-unreachable=now <that ref>probe did not finish in 600s and was killed. - Script-side (
fleet/bin/bare-repack.sh) has no version control./home/ubuntu/nerve-workspace,.../fleet,/home/ubuntuand/home/ubuntu/.nerveall returnfatal: not a git repository, andfleet/is not in this repository's tree, so I cannot open a PR for it.
Question (@alex-clickhouse)
You are the most recent committer here by a wide margin (22 of the last 40 commits), and I have asked you on #453, #454 and #455 in the same area, so you are the person I am asking. Which of A, B or C do you want, and do you want me to prepare the exact commands (A) or the script diff (B) for you to apply?
- A. One-off store repair. Expire the two orphaning reflog entries, or restore
c9d82eb9, then re-run the timer. Unblocks consolidation tonight; does nothing about the next orphaning reset. - B. Close the recurrence in
bare-repack.sh. Expire unreachable reflog entries before the pre-fill walk, so a reflog-only orphan can never gate it again. This is my recommendation, together with A to unblock now. I could not validate it from a slot session for the reason above, so it needs your window either way. - C. Make consolidation walk-free.
git -C /worktrees/.master.git multi-pack-index write(still absent: 0multi-pack-index*files). Immune to this entire failure class by construction, since it indexes packs without traversing commits, but it does not reduce the pack count.
One word on A, B or C unblocks me.
Activity
groeneai commentedon Nov 2, 2026
New occurrence, a different class from the one above, measured 2026-11-02:
bare-repack.shrun finished at2026-11-02T05:15:18Zwithprefill rc=0,repack rc=0, packs 1381 -> 2.0b4da4c972dc(second parent of master merge808fe40f2c52, Ignore inverted Parquet statistics instead of failing the query ClickHouse#128336) is missing from/worktrees/.master.git, although it is reachable fromorigin/masterand fromrefs/heads/parquet-inverted-statistics-ignored, which a live worktree has checked out.git rev-list origin/masterstops withFailed to traverse parents of commit 808fe40f....git merge-base origin/master HEADfails withCould not read 0b4da4c9...in every worktree whose HEAD is not on the newest master (3 of 4 sampled), andgate-review.sh Bskips withno-merge-base.--filter=tree:0 --depth=8, 63 objects) into a private bare repo and exposing it withGIT_ALTERNATE_OBJECT_DIRECTORIESmakesmerge-baseresolve again, to the base GitHub reports. So a one-off fetch of those commits into the shared store would clear it. A slot session must not write the shared store, so this needs the operator.groeneai commentedon Nov 7, 2026
Same class as the 2026-11-02 occurrence, again, measured 2026-11-07:
bare-repackrun ended at2026-11-07T05:33:26Z(Result=success). Since then commit679efd45bfa8(head of La Casa Del Dolor: give a restarted server 180 s to start ClickHouse#128984, merged into master 2026-11-06, so reachable fromorigin/master) is missing from/worktrees/.master.git.git merge-base origin/master HEADfails withCould not read 679efd45...in worktrees based on master older than about 2026-11-03, so the publish base resolution (base-unresolved) andgate-review.sh B(no-merge-base) refuse them.--filter=tree:0 --depth=8fetch of that commit into a private bare repo, 42 objects,GIT_ALTERNATE_OBJECT_DIRECTORIES) mademerge-baseresolve to the base GitHub reports, and Skip granules by aminmaxindex inGROUP BY ... LIMITreads ClickHouse#129887 was published that way. A one-off fetch of that commit into the shared store would clear it for every worktree; that needs the operator.groeneai commentedon Nov 7, 2026
Same class as the 2026-11-02 comment above, again, measured 2026-11-07:
bare-repack.shrun finished at2026-11-07T05:33:26Zwithprefill_rc=0,rc=0, packs 954 -> 4.679efd45bfa8is unreadable in/worktrees/.master.git. It is reachable fromorigin/masteras an ancestor of merge7ebd87aa0a0e(La Casa Del Dolor: give a restarted server 180 s to start ClickHouse#128984, merged 2026-11-06T16:57Z).git merge-base origin/master HEADfails withCould not read 679efd45...in worktrees based on an older master, and Gate B skipped withno-merge-base3 times between 05:34Z and 05:46Z.--filter=tree:0 --depth=8), passed throughGIT_ALTERNATE_OBJECT_DIRECTORIES. Its merge-base matches GitHub'scomparemerge_base_commit.This is the second time in 5 days that the repack has dropped a commit reachable from
origin/master, so the hole is not a one-off.