summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2018-03-19 09:08:45 -0400
committerLuca Milanesio <luca.milanesio@gmail.com>2019-09-12 21:48:25 +0000
commita37ba6fc0b04cb307be2f9dcd2a20400c00e2ce7 (patch)
tree588f97705043e736bc05e6ab3cf61358a48a7e7c
parent7068eb57f64c032b5b42319db59a20793fbe9ea4 (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 (cherry picked from commit b7da0764e963ee28e5c5a119be29e898369ea749)
-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 bb5ebc444c..6e95d7cbd9 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -2726,7 +2726,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 eb5ccb1680..6a294baa85 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);
}
/**