Dave Borowitz 35c76c07b7 Support reindexing immediately after NoteDb upgrade
There are two reasons to support this. One is for an offline upgrade to
NoteDb at a released Gerrit version, where we fully expect there to be
index schema changes in addition to the NoteDb migration. Just kicking
off Reindex immediately after MigrateToNoteDb saves the user an extra
manual invocation. That is implemented in this change.

The other scenario is an online NoteDb migration in conjunction with an
online schema upgrade, where we don't want to increase contention by
running the migration and reindex concurrently. Implementing this will
require managing more subtle interactions between LifecycleListeners,
and is not implemented in this change.

We literally invoke Reindex's main method rather than trying to do
something smarter like reusing the injector stack from MigrateToNoteDb,
because Reindex has a custom set of modules for managing the index
versions. At that point, we could either factor out a variant of
Reindex#run that takes some arguments, or just do a tiny amount of
string manipulation. I went with the latter.

Change-Id: Idf8d0513a08db8bb9e7efda1cf2a12e0579b2fee
2017-06-24 07:04:32 +02:00
..
2017-06-16 20:57:16 -07:00