The process of upgrading Kiln from 2.7.x to 2.9.x is more complex then any of the previous Kiln upgrades, so we recommend that you contact Fog Creek Technical Support in order to discuss an appropriate upgrade plan for your system. For more details, read on.

This update includes a couple of major architectural change to Kiln. If you are at a version of Kiln lower than 2.7.0, then please upgrade to Kiln 2.7.36 first before upgrading to 2.9.x.

The Kiln database schema changes significantly in Version 2.9.x. In order to accommodate this change and maintain the ability to rollback in case of problems, the upgrade process will create a new Kiln database with the new schema and populate it with the data from the existing Kiln database. During the upgrade process this new database will be called “kiln-multitenant”. Once the upgrade is finished, the old (version 2.7.x) database will be renamed to “kiln-unitenant” and the new 2.9.x database will take the name of the original database. This “kiln-unitenant” database represents a backup of your 2.7.x data, so archive it as you see fit.

Additionally, the upgrade process shifts some information from the Kiln Database into Elastic Search instead in order to improve performance. This adds some additional time to the upgrade process.

This upgrade also changes the way that Code Reviews are stored; they are not longer stored as FogBugz cases and are instead their own independent data objects within the Kiln database. In order to move existing Code Reviews over to the new Kiln database, both Kiln and FogBugz need to be running, so this final migration step is actually queued up as work to be done after the installer itself finishes. Because of this, you may see some additional CPU churn on your server until this final migration of the Code Reviews completes.

And finally, due to some changes in the schema of our indexing engine, this upgrade is obligated to re-index all of your existing code. This is also queued up as work to do after the installer itself finishes. Code search may return incomplete results until all of the indexing tasks are complete. Some users with a large number of repositories and a large number of files in those repositories have seen these indexing tasks overwhelm the Kiln Server and cause it to become unresponsive or extremely slow for normal operations. If you find that your Kiln Server slows down to a crawl or becomes unresponsive after this upgrade, try creating these two values in the windows registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\Kiln\QueueService
concurrency (string value) = 6
timeout (string value) = 600

After adding these values to the registry, you must restart the Kiln Storage Service and Kiln Queuing Service for them to take effect. As you may suspect, the first value changes the number of tasks in the queue that are allowed to run at the same time and the second value dictates how long a given task is allowed to run before it is considered a failure.

As always, please contact us if you have any questions or run into any problems!