Merge branch 'stable-3.10' into stable-3.11
* stable-3.10:
Properly cleanup site3
Change-Id: I2f4ee4c6d740a11828706ddc53fc4655452e5354
diff --git a/setup_local_env/README.md b/setup_local_env/README.md
index e6ec9e7..8d9665f 100644
--- a/setup_local_env/README.md
+++ b/setup_local_env/README.md
@@ -74,7 +74,7 @@
[--gerrit2-httpd-port] Gerrit Instance 2 http port; default 18081
[--gerrit2-sshd-port] Gerrit Instance 2 sshd port; default 49418
-[--replication-delay] Replication delay across the two instances in seconds
+[--replication-delay] Replication delay across the two instances in seconds; default 5 seconds
[--just-cleanup-env] Cleans up previous deployment; default false
diff --git a/setup_local_env/setup.sh b/setup_local_env/setup.sh
index b25edf1..3e79f14 100755
--- a/setup_local_env/setup.sh
+++ b/setup_local_env/setup.sh
@@ -16,7 +16,7 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-GERRIT_BRANCH=stable-3.10
+GERRIT_BRANCH=stable-3.11
GERRIT_CI=https://gerrit-ci.gerritforge.com/view/Plugins-$GERRIT_BRANCH/job
LAST_BUILD=lastSuccessfulBuild/artifact/bazel-bin/plugins
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/index/ChangeChecker.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/index/ChangeChecker.java
index 3277150..4a081d0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/multisite/index/ChangeChecker.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/index/ChangeChecker.java
@@ -27,7 +27,7 @@
*
* @return notes of the Change
*/
- public Optional<ChangeNotes> getChangeNotes();
+ Optional<ChangeNotes> getChangeNotes();
/**
* Create a new index event POJO associated with the current Change.
@@ -39,7 +39,7 @@
* @return new IndexEvent
* @throws IOException if the current Change cannot read
*/
- public Optional<ChangeIndexEvent> newIndexEvent(String projectName, int changeId, boolean deleted)
+ Optional<ChangeIndexEvent> newIndexEvent(String projectName, int changeId, boolean deleted)
throws IOException;
/**
@@ -48,7 +48,7 @@
* @param indexEvent indexing event
* @return true if the local Change is up-to-date, false otherwise.
*/
- public boolean isUpToDate(Optional<ChangeIndexEvent> indexEvent);
+ boolean isUpToDate(Optional<ChangeIndexEvent> indexEvent);
/**
* Return the last computed up-to-date Change time-stamp.
@@ -58,12 +58,12 @@
* @return the Change timestamp epoch in seconds
* @throws IOException if an I/O error occurred while reading the local Change
*/
- public Optional<Long> getComputedChangeTs() throws IOException;
+ Optional<Long> getComputedChangeTs() throws IOException;
/**
* Check if the local Change contains current patchset refs
*
* @return true if local change contains meta and current patchset refs
*/
- public boolean isChangeConsistent();
+ boolean isChangeConsistent();
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java
index 6f8ec50..958f265 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/ValidationModule.java
@@ -20,6 +20,7 @@
import com.gerritforge.gerrit.globalrefdb.validation.RefUpdateValidator;
import com.gerritforge.gerrit.globalrefdb.validation.SharedRefDatabaseWrapper;
import com.gerritforge.gerrit.globalrefdb.validation.SharedRefDbBatchRefUpdate;
+import com.gerritforge.gerrit.globalrefdb.validation.SharedRefDbExceptionHook;
import com.gerritforge.gerrit.globalrefdb.validation.SharedRefDbGitRepositoryManager;
import com.gerritforge.gerrit.globalrefdb.validation.SharedRefDbRefDatabase;
import com.gerritforge.gerrit.globalrefdb.validation.SharedRefDbRefUpdate;
@@ -30,6 +31,8 @@
import com.gerritforge.gerrit.globalrefdb.validation.dfsrefdb.SharedRefEnforcement;
import com.google.common.collect.ImmutableSet;
import com.google.gerrit.extensions.config.FactoryModule;
+import com.google.gerrit.extensions.registration.DynamicSet;
+import com.google.gerrit.server.ExceptionHook;
import com.google.gerrit.server.config.RepositoryConfig;
import com.google.inject.Scopes;
import com.google.inject.TypeLiteral;
@@ -73,5 +76,7 @@
.to(CustomSharedRefEnforcementByProject.class)
.in(Scopes.SINGLETON);
}
+
+ DynamicSet.bind(binder(), ExceptionHook.class).to(SharedRefDbExceptionHook.class);
}
}
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index 1587bd9..63469f3 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -16,12 +16,7 @@
* connected to the same message broker
* behind a load balancer (e.g., HAProxy)
-Currently, the mode supported is one primary read/write master and multiple
-read-only masters but eventually the plan is to support `n` read/write masters.
-The read/write master is handling any traffic while the
-read-only masters are serving the Gerrit GUI assets, the HTTP GET REST API and
-git-upload-pack. The read-only masters are kept updated to be always
-ready to become a read/write master.
+Currently, the plugin can support multiple read/write masters as required.
The areas of alignment between the masters are: