Description
Problem
Sometimes JIRA's index is corrupted during shutdown. See: JRASERVER-61099
Now the only way to fix it is to delete the whole index and run foreground reindex, which makes JIRA inactive for the period of reindexing.
Suggested Solution
Lucene already has a tool to check and fix corrupted index: CheckIndex
We can use this and fix index during startup. Obviously we'll lose some data, but at least JIRA will be operational.