Understanding the cleanup of abandoned transactions

An abandoned transaction (also known as a dead transaction) is the result of some unexpected situation during the commit process. For example, if the connection between the Subversion client and server is lost during the commit.

From the technical point of view, an abandoned transaction is a folder on disk on the server side that contains uncommitted changes received from the client. All transactions are isolated, so an abandoned transaction does not interfere with any other commits. However, abandoned transactions do not get removed automatically during regular Subversion operations, so they continue to consume disk space on the server.

How transaction cleanup works

If a transaction did not change for a very long time (such as for several days), it is reasonable to assume that it has been abandoned by the client and that it can be cleaned up. Based on this assumption, the cleanup process scans for transactions whose contents have not changed for a certain administrator-defined period of time and removes them.

It is possible to set the threshold period of time that needs to pass since the last modification of a transaction's contents after which the transaction is considered abandoned and can be cleaned up.

Ways to clean up abandoned transactions

VisualSVN Server Manager provides two ways to clean up abandoned transactions:

  • One-time cleanup of abandoned transactions.
  • Scheduled cleanup of abandoned transactions with a Cleanup Transactions job.

One-time cleanup of abandoned transactions

Available since VisualSVN Server 6.0.

This method allows you to immediately clean up all abandoned transactions for a specific repository.

To perform a one-time transaction cleanup, follow these steps:

  1. Start the VisualSVN Server Manager console.
  2. In the left-hand pane, expand the Repositories node.
  3. Right-click a repository.
  4. Select All Tasks | Cleanup transactions.
  5. Optionally, use the Delete uncommitted transactions older than drop-down list to adjust which transactions the cleanup should consider abandoned and should delete. This age of an uncommitted transaction is the time since it last changed on disk.
  6. Click Cleanup.
Warning
Selecting a short age threshold (e.g. 10 minutes) may cancel current in-progress commits.

Scheduled cleanup of abandoned transactions

Available since VisualSVN Server 5.0.

With a Cleanup Transactions job, you can set up automatic transaction cleanups that will run on a schedule. You can configure such a job to regularly clean up abandoned transactions either for all or for certain selected repositories. See KB199: Getting started with Cleanup Transactions Jobs.

See also

KB199: Getting started with Cleanup Transactions Jobs
Removing dead transactions

Last updated: