Getting started with Cleanup Transactions Jobs

Applies to: VisualSVN Server 5.0 and later

Cleanup Transactions jobs can be used to perform a scheduled removal of dead transactions. This article describes how to create and manage Cleanup Transactions jobs and how to examine the results of their work.

What is a dead transaction

A dead transaction is the result of some unexpected situation throughout the commit process. For example, when the connection to the server is lost before the transaction completes.

From the technical point of view, a dead transaction is a folder on the disk that contains uncommitted changes received from the client. All transactions are isolated, so a dead transaction does not interfere with any other commits. However, dead 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 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 the specified number of days and removes them.

Creating Cleanup Transactions Jobs

You can add a scheduled Cleanup Transactions job using the corresponding wizard in the VisualSVN Server Manager console:

  1. Right-click the Jobs element in the VisualSVN Server Manager console.
  2. Click New | Cleanup Transactions Job.
  3. Name the job and optionally provide a description for it. Click Next.
  4. Select the repositories you would like to clean up. Click Next.
  5. Specify the time period, in days, after which uncommitted transactions are deleted. Click Next.
  6. Choose the time and days of the week when it should run. Click Next.
  7. Specify when the job email notifications should be sent. Click Next.
  8. Click Create.
  9. Click Finish.

The new job will be created and will run according to schedule.

Managing Cleanup Transactions Jobs

Every configured job, including Cleanup Transactions jobs, are shown within the Jobs element in VisualSVN Server Manager. For each job you can see its name, type, status, and the result of the last run. The Cleanup Transactions jobs will have their type displayed as Cleanup transactions.

The current state of the job is shown in the Status column. Possible values are the following:

  • Ready. The job is in standby mode. It is active and ready to start.
  • Running. The job is running right now.
  • Disabled. The job is deactivated and will not run on its schedule.

The result of the last run is shown in the Last Run column. Possible values are the following:

  • Success. The cleanup process has completed successfully.
  • Error. At least one error occurred during the cleanup process.
  • Interrupted. The running job has been interrupted and did not complete.

The last run status of the job is also indicated by the overlay icon near its name. As an example, a warning overlay icon will be displayed if the job's last run was interrupted.

Additionally, the Last Run Details column contains brief information about the outcome of the job's last run. For example: "Successfully processed 10 repositories (2 transactions deleted)".

To manage Cleanup Transactions jobs, you can use the context menu commands, such as Run, End, or Disable. You can also manage them using the PowerShell cmdlets: Get-SvnJob, Start-SvnJob, Stop-SvnJob, Enable-SvnJob and Disable-SvnJob. For more information about the PowerShell cmdlets, read the article KB88: VisualSVN Server PowerShell Cmdlet Reference.

See also

KB185: Understanding Background Job notifications

Last Modified: