oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.3k stars 739 forks source link

consider failing indexing of a project if history cache creation fails #4411

Closed vladak closed 8 months ago

vladak commented 9 months ago

As raised on https://github.com/oracle/opengrok/discussions/4145#discussioncomment-7100494 , if history cache cannot be generated without problem for a repository, it might make sense to fail the indexing of related project. The raionale being if the history cache is incomplete, the overall index will be incomplete, possibly leading to confusing search results.

Notably, FileHistoryCache#finishStore() contains a soft check for total failure to generate history cache however this does not propagate to the 2nd phase of indexing and in the context of this bug it probably should.

Also, #747 is probably a sibling.

If implemented, it might be worth considering adding some --force indexer option to provide a way how to override this.