PruneUnreachableObjects does not prune with transactions
PruneUnreachableObjects
doesn't use the general case transactional handling setup in the middleware. This is because it is a no-op with transactions. However, it performs disk operations before returning the no-op response. The RPC needs to run in transaction if it needs to check repository existence.
Moreover, the RPC is incorrectly made into a no-op with transactions. The reasoning to do so was because we don't have loose objects anymore. We still can have unreachable objects in packs, and the RPC does perform a full repack to get rid of them.
Edited by Sami Hiltunen