Merge branch 'stable-3.10' * stable-3.10: Don't consider drafts for the up-to-date check on changes Change-Id: Iffcd2b3763d070e7f3ce65d9a17a3dd07663706a
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/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 fc4d505..ed22855 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); } }