Troubleshooting warnings about unavailable database trim

Applies to: VisualSVN Server 5.0 and later

Symptom

Each time the VisualSVN Server Indexing Service is started, the following warning is logged into the Windows Event Log under Applications and Services Logs | VisualSVN Server Search:

The database trim feature is not available on this Windows version. It is available only starting from Windows Server 2016 or an equivalent client Windows version. The database file may retain its on-disk size even after the repository indexes are removed.

Please consider upgrading to a newer Windows version.

Cause

This warning means that the installed version of the operating system (on the computer running VisualSVN Server) does not support a feature called database trim. The feature is available only starting from Windows Server 2016, and is not available on Windows Server 2012 R2 and on earlier server versions of Windows (and is also not available on Windows 8.1 and on earlier non-server versions of Windows).

Database trim is a feature that is in certain cases used by the VisualSVN Server Indexing Service to free up disk space occupied by the search index.

Effects of not having database trim

The full-text search feature is still going to work properly, even if the above-mentioned warnings are logged. However, search index files used by the full-text search feature may occupy more space on disk than what is strictly required.

In particular, the on-disk size of the search index database will not be reduced in the following cases:

  • after you disable search either for a particular repository or globally for VisualSVN Server, assuming that it was previously enabled;
  • after you delete a repository for which search was enabled.

In the two cases mentioned above, when database trim is not available, the disk space will not be freed up despite the fact that the corresponding repository-specific search indices are considered deleted, from the point of view of the search index database. And despite the fact that the SearchIndexSize of the deleted repository-specific indices will be reported as 0 KB by the Measure-SvnRepository PowerShell cmdlet.

Note
If database trim is available, the VisualSVN Server Indexing Service will on a regular basis free up the unnecessary disk space occupied by the search index, if any parts of the main search index file are no longer required due to the two cases described above.

Resolution

It is recommended that you upgrade your operating system on the computer running VisualSVN Server to Windows Server 2016 or later, to ensure the optimal storage efficiency of the search index by making it possible for VisualSVN Server to automatically shrink (trim) the search index.

Workaround

If you cannot upgrade the computer running VisualSVN Server to Windows Server 2016 or later, you can still reclaim the unused disk space occupied by the search index (such as after deleting a repository or disabling search). You can do it by rebuilding the search index.

Using this workaround to free up disk space only makes sense in case you have deleted a repository or disabled search indexing for any particular repository.

Note
Rebuilding the search index from scratch as described below is usually a lengthy operation, where the time taken by this operation depends on the size of the repositories being indexed. Most of the search capabilities for a repository are unavailable until its initial indexing is complete.

Follow these steps to rebuild the search index for all repositories (for which search indexing is enabled):

  1. Start the VisualSVN Server Manager console.
  2. In the left-hand pane, select the topmost VisualSVN Server node.
  3. Click the Action | All Tasks | Rebuild Search Index Database main menu command.

At any point in time you can monitor the search indexing status, to see the progress of rebuilding the search index.

Last Modified: