Skip to content

housekeeping: Don't write cruft packs in pool repositories

We have recently introduced the logic to write cruft packs, which are a mechanism to phase out unreachable objects without having to explode them into loose objects first. When the accompanying feature flag is enabled, then we will write these during a full repack and also expire any objects already part of a preexisting cruft pack which are older than two weeks.

This is not what we want in object pools though, where we must make sure to never delete any objects at all. While it is fine to generate cruft packs there, we must never expire them.

Fix this oversight by not using cruft packs for object pools. While it would be safe to use them, an object pool shouldn't typically have any unreachable objects anyway due to the dangling refs mechanism. We can still iterate on this at a later point and start writing cruft packs, but without expiring any of their objects if required.

Edited by Patrick Steinhardt

Merge request reports