New issue
Advanced search Search tips

Issue 6472 link

Starred by 4 users

Issue metadata

Status: Released
Owner:
Closed: Jun 2017
Cc:
Components:



Sign in to add a comment

On-line reindex fails for all changes with rules or groups implemented by plugins

Project Member Reported by luca.mil...@gmail.com, Jun 9 2017

Issue description

*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version:

What steps will reproduce the problem?
1. Install a plugin that provides groups or custom Prolog predicates (e.g. singleusergroup and owners plugins)
2. Configure a project with review labels with ACLs associated to plugin-provided groups
3. Configure the same project with custom Prolog rules using a plugin-provided predicate
4. Upgrade Gerrit war to a more advanced version of the Change index
5. Startup Gerrit

What is the expected output?
On-line reindex kicks in and all the changes' rules are getting evaluated with the correct groups and Prolog rules and predicates

What do you see instead?
On-line reindex fails to reindex all changes and pollute the Prolog predicates cache because of the inability to access the plugins predicates.

The same situation happens all the times that you start Gerrit again because the index fails the upgrade phase. Off-line reindex is not an option either because plugins aren't loaded at all and it would eventually fail as well.

Please provide any additional information below.

The problem lies in the ordering of registration of IndexModule and PluginRestApiModule in Daemon.java when the sysInjector is created.

Current order is:
modules.add(createIndexModule());
modules.add(new PluginRestApiModule());

Whilst the correct order should be:
modules.add(new PluginRestApiModule());
modules.add(createIndexModule());

The Lifecycle listener calls the start() methods respecting the registration order and then ... *boom* if the order is wrong.
 
Project Member

Comment 1 by david.os...@gmail.com, Jun 20 2017

Status: ChangeUnderReview (was: New)
https://gerrit-review.googlesource.com/109493
Project Member

Comment 2 by david.os...@gmail.com, Jun 20 2017

Labels: -Priority-0 FixedIn-2.14
Status: Submitted (was: ChangeUnderReview)
Labels: -FixedIn-2.14 FixedIn-2.14.2
Status: Released (was: Submitted)
Fixed Released to be success

Sign in to add a comment