Files
gerrit/gerrit-httpd
David Ostrovsky c844bc5c86 EqualsFilePredicate: Make it work in project watches
Secondary index underwent quite some evolution, by adding new fields
or turning search predicates that (uncorrectly) used database to
produce matches to use secondary index. When new index version is
added, the previous index version must still be supported because of
online reindexing feature. On very big site, reindexing may take hours,
clearly such a long offline time is non acceptable, that why online
reindexing feature was invented. To make online reindexing work, schema
version must be fetched to route the current search predicate to use
old (legacy) or new field. For that IndexCollection is accessed and
the current schema version is read.

It seems that not the correct instance of IndexCollection is "seen"
from the HTTPD guice module. As the consequence we are getting a NPE
when file:foo predicate is used in add project watches feature. Use
the provider instead to rectify the problem.

Test Plan:

- Add "file:foo" predicate to project watches

Confirm that the new watch is created and no NPE is thrown.

Change-Id: I750be217a34cdf97b71e726bea93b3c34ca0ceb0
2016-02-10 00:23:09 +00:00
..
2015-12-03 10:33:28 -05:00