Search code examples
elasticsearchtfscode-search

Retention policy to TFS Code Search Server (Elastic Search)


We have TFS 2017.3 with separate Code Search server.

We have huge TFS DB (about 1.6TB), in the code search server we have 700GB dis space.

After few weeks the disk space running out and the code search not work in the tfs.

After we increase the disk space the search back to work. How can we make retention policy to delete old code search data (index)? we don't want to increased more the disk space.


Solution

  • I was able to reduce the disk size after deleting the ES folders, reinstalling the code search extension, and sometimes had to run the MissingIndexFolderTriggerCollectionIndexing.ps1.

    But - I came to the conclusion that it was not worth doing, the disk size was growing rapidly and reaching the original size, so I did not save anything.

    Although Microsoft recommends giving disk space of 35% of the DB, it is not enough for us and we increase the size when the disk is full to the end (currently about 45% of the DB size).

    The conclusion - don't touch the ES, if the disk fills up then increase the disk size.