Skip to content

Commit 3372675

Browse files
committed
add checks for history related tunables
1 parent ac7d53a commit 3372675

File tree

1 file changed

+8
-0
lines changed
  • opengrok-indexer/src/main/java/org/opengrok/indexer/index

1 file changed

+8
-0
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/Indexer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,14 @@ private static void checkConfiguration() {
908908
if (!new File(cfg.getDataRoot()).canWrite()) {
909909
die("Data root '" + cfg.getDataRoot() + "' must be writable");
910910
}
911+
912+
if (!cfg.isHistoryEnabled() && cfg.isHistoryBasedReindex()) {
913+
die("History has to be enabled for history based reindex");
914+
}
915+
916+
if (!cfg.isHistoryCache() && cfg.isHistoryBasedReindex()) {
917+
die("History cache has to be enabled for history based reindex");
918+
}
911919
}
912920

913921
private static void die(String message) {

0 commit comments

Comments
 (0)