Merge branch 'stable-2.15'
* stable-2.15: Fix the online index for changes when upgrading ES gerrit site Update git submodules Update git submodules config-mail: Remove redundant colons from section titles Change-Id: Ia424576f92edb038d4581d484d90a6378432ea9d
This commit is contained in:
commit
18821f60af
@ -11,7 +11,7 @@ the template language for Gerrit emails. Support for VTL has now been removed
|
||||
in favor of Soy, and Velocity templates that modify text emails are no longer
|
||||
supported.
|
||||
|
||||
== Template Locations and Extensions:
|
||||
== Template Locations and Extensions
|
||||
|
||||
The default example templates reside under: `'$site_path'/etc/mail` and are
|
||||
terminated with the double extension `.soy.example`. Modifying these example
|
||||
@ -19,7 +19,7 @@ files will have no effect on the behavior of Gerrit. However, copying an
|
||||
example template to an equivalently named file without the `.example` extension
|
||||
and modifying it will allow an administrator to customize the template.
|
||||
|
||||
== Supported Mail Templates:
|
||||
== Supported Mail Templates
|
||||
|
||||
Each mail that Gerrit sends out is controlled by at least one template. These
|
||||
are listed below. Change emails are influenced by two additional templates,
|
||||
|
@ -63,6 +63,8 @@ public class OnlineReindexer<K, V, I extends Index<K, V>> {
|
||||
try {
|
||||
reindex();
|
||||
ok = true;
|
||||
} catch (IOException e) {
|
||||
log.error("Online reindex of {} schema version {} failed", name, version(index), e);
|
||||
} finally {
|
||||
running.set(false);
|
||||
if (!ok) {
|
||||
@ -91,7 +93,7 @@ public class OnlineReindexer<K, V, I extends Index<K, V>> {
|
||||
return i.getSchema().getVersion();
|
||||
}
|
||||
|
||||
private void reindex() {
|
||||
private void reindex() throws IOException {
|
||||
for (OnlineUpgradeListener listener : listeners) {
|
||||
listener.onStart(name, oldVersion, newVersion);
|
||||
}
|
||||
@ -106,6 +108,10 @@ public class OnlineReindexer<K, V, I extends Index<K, V>> {
|
||||
name,
|
||||
version(indexes.getSearchIndex()),
|
||||
version(index));
|
||||
|
||||
if (oldVersion != newVersion) {
|
||||
index.deleteAll();
|
||||
}
|
||||
SiteIndexer.Result result = batchIndexer.indexAll(index);
|
||||
if (!result.success()) {
|
||||
log.error(
|
||||
|
Loading…
Reference in New Issue
Block a user