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:
- Right-click the Jobs element in the VisualSVN Server Manager console.
- Click New | Cleanup Transactions Job.
- Name the job and optionally provide a description for it. Click Next.
- Select the repositories you would like to clean up. Click Next.
- Specify the time period, in days, after which uncommitted transactions are deleted. Click Next.
- Choose the time and days of the week when it should run. Click Next.
- Specify when the job email notifications should be sent. Click Next.
- Click Create.
- 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:
Disable-SvnJob. For more
information about the PowerShell cmdlets, read the article
KB88: VisualSVN Server PowerShell Cmdlet Reference.