mraible opened a new pull request, #264: URL: https://github.com/apache/roller/pull/264
`LuceneIndexManager` creates `.index-inconsistent` in the index directory at startup and deletes it in `shutdown()`. If the marker is there at the next start, the last run ended early and the index is rebuilt. `deleteIndex()` removed every file in the index directory, the marker included. Startup replaces the index in four cases: the marker was found, the index is missing, it holds removed fields, or it can't be opened. In each of them the marker disappeared for the rest of the run. So if Roller was stopped or crashed during the background rebuild that follows, the next start found no marker, opened the partial index, and kept it until someone deleted the directory by hand. `deleteIndex()` now skips the marker. `IndexConsistencyMarkerTest`: - starts on an empty index directory (rebuild scheduled), then starts a second manager without a `shutdown()` and checks that it schedules a rebuild again. This fails on master. - checks that a clean shutdown removes the marker and the next start doesn't rebuild. The other search tests still pass. #261 also changes `LuceneIndexManager`, in `initialize()`'s catch block rather than `deleteIndex()`, so the two shouldn't conflict. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
