summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2018-03-19 09:08:45 -0400
committerDave Borowitz <dborowitz@google.com>2018-03-19 09:33:21 -0400
commitb7da0764e963ee28e5c5a119be29e898369ea749 (patch)
treecf71febb206d9ffb3afe2bb11dbf16dec6372fa5
parent8f1dc546c12ec7c8fb8ebd63290e16e55eb7cb45 (diff)
Turn off autoReindexIfStale by default
Although the race condition described in I04ac36ea5 is real, in a Lucene environment it is largely theoretical and hasn't been the cause of actual bugreports. At any rate, it's always been an issue with the change index, and is not a regression in 2.15. Disable the check for now, to give us time to investigate without blocking a new release. Bug: Issue 8582 Change-Id: Ia0478b5541ac0442d2aa53e33c2dae09bf0c262d
-rw-r--r--Documentation/config-gerrit.txt2
-rw-r--r--gerrit-server/src/main/java/com/google/gerrit/server/index/change/ChangeIndexer.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index db37e43689..752264995c 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -2768,7 +2768,7 @@ immediately after indexing it. If false, there is a race condition during two
simultaneous writes that may cause one of the writes to not be reflected in the
index. The check to avoid this does consume some resources.
+
-Defaults to true.
+Defaults to false.
==== Lucene configuration
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/index/change/ChangeIndexer.java b/gerrit-server/src/main/java/com/google/gerrit/server/index/change/ChangeIndexer.java
index 3eeb4953c1..ba62fe079d 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/index/change/ChangeIndexer.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/index/change/ChangeIndexer.java
@@ -166,7 +166,7 @@ public class ChangeIndexer {
}
private static boolean autoReindexIfStale(Config cfg) {
- return cfg.getBoolean("index", null, "autoReindexIfStale", true);
+ return cfg.getBoolean("index", null, "autoReindexIfStale", false);
}
/**