Skip to content

Handle PruneUnreachableObjects correctly with transactions

Sami Hiltunen requested to merge smh-fix-prune-unreachable-objects into master

PruneUnreachableObjects doesn't have its transaction started currently by the middleware. This leads to performing reads outside of a transaction when checking repository existence on disk.

Further, the method has been made into a no-op. This is not correct as there may still be unreachable objects in the repository with transactions that may need to be pruned. Restore the functionality of the RPC with transactions. Behavior is slightly different with transactions as pruning always removes all unreachable objects without a grace period. This is safe with transactions as the conflict checks prevent races with pruning and objects becoming reachable.

Closes Housekeeping doesn't prune unreachable loose ob... (#6145 - closed)
Closes PruneUnreachableObjects does not prune with tra... (#6139 - closed)

Merge request reports