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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user