gerrit/gerrit-pgm
Marco Miller 25d42dd5f4 Fix slave cloning issue by binding Scanning rather than Searching /index
Move ChangeCache implementation binding from GerritGlobalModule to new
ChangeCacheImplModule. This is so that GerritGlobalModule no longer
assumes a SearchingChangeCacheImpl. This was preventing slave gerrit
servers from binding a ScanningChangeCacheImpl instead, as they do not
rely on searching (an index); scanning, rather, relies on the git repo.

Add new ChangeCacheImplModule usage to Daemon, so the latter can tell
the former about gerrit server running as a slave or not.
ChangeCacheImplModule can then install either the
ScanningChangeCacheImpl or SearchingChangeCacheImpl module, which binds
the corresponding ChangeCache implementation.

Adapt InMemoryModule and WebAppInitializer accordingly.
Fix ScanningChangeCacheImpl logger initialization.

The Daemon non-slave case is already covered by existing IT testing. The
slave case (involving a new branch in ChangeCacheImplModule) has to be
tested manually; below bug/issue has a scenario. Now,
ScanningChangeCacheImpl is already covered by IT. And, that slave case
is exercised each time a slave gerrit server runs.

InMemoryModule is exercised by existing unit testing; WebAppInitializer
is used by web.xml. In both cases, the existing behavior was kept in the
code.

Bug: Issue 3323
Change-Id: Idfa255a5ef754979ca8289ae178e022c1e94be97
2015-04-27 09:00:16 -04:00
..
src Fix slave cloning issue by binding Scanning rather than Searching /index 2015-04-27 09:00:16 -04:00
BUCK Merge branch 'stable-2.10' into stable-2.11 2015-03-16 14:10:54 +09:00