Merge branch 'stable-2.14'

* stable-2.14:
  Fix documentation of the review command
  Fix online reindexing for plugins-dependent rules
  De-couple PluginModule and PluginRestApiModule registration

Change-Id: Ic6dd1c019e7a451f325d378b071f2347f82c2e44
This commit is contained in:
David Pursehouse
2017-06-12 20:03:00 +09:00
4 changed files with 30 additions and 2 deletions

View File

@@ -74,6 +74,7 @@ import com.google.gerrit.server.mail.send.SmtpEmailSender;
import com.google.gerrit.server.mime.MimeUtil2Module;
import com.google.gerrit.server.patch.DiffExecutorModule;
import com.google.gerrit.server.plugins.PluginGuiceEnvironment;
import com.google.gerrit.server.plugins.PluginModule;
import com.google.gerrit.server.plugins.PluginRestApiModule;
import com.google.gerrit.server.project.DefaultPermissionBackendModule;
import com.google.gerrit.server.schema.DataSourceProvider;
@@ -351,6 +352,19 @@ public class Daemon extends SiteProgram {
modules.add(new DropWizardMetricMaker.RestModule());
modules.add(new LogFileCompressor.Module());
// Plugin module needs to be inserted *before* the index module.
// There is the concept of LifecycleModule, in Gerrit's own extension
// to Guice, which has these:
// listener().to(SomeClassImplementingLifecycleListener.class);
// and the start() methods of each such listener are executed in the
// order they are declared.
// Makes sure that PluginLoader.start() is executed before the
// LuceneIndexModule.start() so that plugins get loaded and the respective
// Guice modules installed so that the on-line reindexing will happen
// with the proper classes (e.g. group backends, custom Prolog
// predicates) and the associated rules ready to be evaluated.
modules.add(new PluginModule());
// Index module shutdown must happen before work queue shutdown, otherwise
// work queue can get stuck waiting on index futures that will never return.
modules.add(createIndexModule());