diff options
author | Marco Miller <marco.miller@ericsson.com> | 2020-06-16 13:25:04 -0400 |
---|---|---|
committer | Marco Miller <marco.miller@ericsson.com> | 2020-06-16 13:25:04 -0400 |
commit | 279c3a1dc26527b5d61153f27f3a2bd3636fffdc (patch) | |
tree | e42a966bb6d9a2e30f50ac493348ea73d6c7825e | |
parent | b5f183e91ea5b72c26578a6caab8d77769f9c014 (diff) | |
parent | 56918394544b6207a626cb0938d0bba4927a9fa4 (diff) |
Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
Revert "Remove documentation of obsolete gerrit.canLoadInIFrame"
Fix typos in note-db.txt
Document skipping of reindexing step for offline NoteDB migration
Report end of NoteDB migration when skipping reindexing
Clarify that index.batchThreads is relevant for offline reindexing
Add project to output when reindexing changes in verbose mode
Auto-flush SiteIndexer's PrintWriters
Allow to re-index in verbose mode during NoteDB migration
Avoid closing System.out after All-Users GC in NoteDB migration
Honor project watches also for changes created via cherry-pick
Report the index state after re-indexing
Change-Id: Icb446c6b8889e6eea790b2fe5ebc8e83ebc39082
-rw-r--r-- | Documentation/config-gerrit.txt | 9 | ||||
-rw-r--r-- | Documentation/note-db.txt | 7 | ||||
-rw-r--r-- | Documentation/rest-api-changes.txt | 2 | ||||
-rw-r--r-- | java/com/google/gerrit/extensions/api/changes/CherryPickInput.java | 2 | ||||
-rw-r--r-- | java/com/google/gerrit/index/SiteIndexer.java | 2 | ||||
-rw-r--r-- | java/com/google/gerrit/pgm/Reindex.java | 3 | ||||
-rw-r--r-- | java/com/google/gerrit/server/index/change/AllChangesIndexer.java | 3 |
7 files changed, 23 insertions, 5 deletions
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 8ccd80fef4..d19e181180 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -2103,6 +2103,13 @@ file containing the class must be placed in the `$site_path/lib` folder. + If not specified, the default no-op implementation is used. +[[gerrit.canLoadInIFrame]]gerrit.canLoadInIFrame:: ++ +For security reasons Gerrit will always jump out of iframe. +Setting this option to true will prevent this behavior. ++ +By default false. + [[gerrit.cdnPath]]gerrit.cdnPath:: + Path prefix for PolyGerrit's static resources if using a CDN. @@ -2775,7 +2782,7 @@ by the JVM. If set to a negative value, defaults to a direct executor. [[index.batchThreads]]index.batchThreads:: + Number of threads to use for indexing in background operations, such as -online schema upgrades. +online schema upgrades, and also for offline reindexing. + If not set or set to a zero, defaults to the number of logical CPUs as returned by the JVM. If set to a negative value, defaults to a direct executor. diff --git a/Documentation/note-db.txt b/Documentation/note-db.txt index 8725cee98d..49f8049c8b 100644 --- a/Documentation/note-db.txt +++ b/Documentation/note-db.txt @@ -109,6 +109,13 @@ Migration requires a heap size comparable to running a Gerrit server. If you normally run `gerrit.war daemon` with an `-Xmx` flag, pass that to the migration tool as well. +[NOTE] +Note that by appending `--reindex false` to the above command, you can skip the +lengthy, implicit reindexing step of the migration. This is useful if you plan +to perform further Gerrit upgrades while the server is offline and have to +reindex later anyway (E.g.: a follow-up upgrade to Gerrit 3.2 or newer, which +requires to reindex changes anyway). + *Advantages* * Much faster than online; can use all available CPUs, since no live traffic diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt index 91c1cffdc9..16d715478d 100644 --- a/Documentation/rest-api-changes.txt +++ b/Documentation/rest-api-changes.txt @@ -6036,7 +6036,7 @@ Number of the parent relative to which the cherry-pick should be considered. Notify handling that defines to whom email notifications should be sent after the cherry-pick. + Allowed values are `NONE`, `OWNER`, `OWNER_REVIEWERS` and `ALL`. + -If not set, the default is `NONE`. +If not set, the default is `ALL`. |`notify_details` |optional| Additional information about whom to notify about the update as a map of recipient type to link:#notify-info[NotifyInfo] entity. diff --git a/java/com/google/gerrit/extensions/api/changes/CherryPickInput.java b/java/com/google/gerrit/extensions/api/changes/CherryPickInput.java index 5ac67e7def..0aace7b02c 100644 --- a/java/com/google/gerrit/extensions/api/changes/CherryPickInput.java +++ b/java/com/google/gerrit/extensions/api/changes/CherryPickInput.java @@ -24,7 +24,7 @@ public class CherryPickInput { public String base; public Integer parent; - public NotifyHandling notify = NotifyHandling.NONE; + public NotifyHandling notify = NotifyHandling.ALL; public Map<RecipientType, NotifyInfo> notifyDetails; public boolean keepReviewers; diff --git a/java/com/google/gerrit/index/SiteIndexer.java b/java/com/google/gerrit/index/SiteIndexer.java index c3ab8a42e5..f209f2437e 100644 --- a/java/com/google/gerrit/index/SiteIndexer.java +++ b/java/com/google/gerrit/index/SiteIndexer.java @@ -89,7 +89,7 @@ public abstract class SiteIndexer<K, V, I extends Index<K, V>> { } protected PrintWriter newPrintWriter(OutputStream out) { - return new PrintWriter(new OutputStreamWriter(out, UTF_8)); + return new PrintWriter(new OutputStreamWriter(out, UTF_8), true); } private static class ErrorListener implements Runnable { diff --git a/java/com/google/gerrit/pgm/Reindex.java b/java/com/google/gerrit/pgm/Reindex.java index 2e526bb454..966801f382 100644 --- a/java/com/google/gerrit/pgm/Reindex.java +++ b/java/com/google/gerrit/pgm/Reindex.java @@ -202,6 +202,9 @@ public class Reindex extends SiteProgram { if (result.success()) { index.markReady(true); } + System.out.format( + "Index %s in version %d is %sready\n", + def.getName(), index.getSchema().getVersion(), result.success() ? "" : "NOT "); return result.success(); } } diff --git a/java/com/google/gerrit/server/index/change/AllChangesIndexer.java b/java/com/google/gerrit/server/index/change/AllChangesIndexer.java index 4f23e88dbe..8434c10109 100644 --- a/java/com/google/gerrit/server/index/change/AllChangesIndexer.java +++ b/java/com/google/gerrit/server/index/change/AllChangesIndexer.java @@ -239,7 +239,8 @@ public class AllChangesIndexer extends SiteIndexer<Change.Id, ChangeData, Change try { indexer.index(changeDataFactory.create(r.notes())); done.update(1); - verboseWriter.println("Reindexed change " + r.id()); + verboseWriter.format( + "Reindexed change %d (project: %s)\n", r.id().get(), r.notes().getProjectName().get()); } catch (RejectedExecutionException e) { // Server shutdown, don't spam the logs. failSilently(); |