To support a live migration on a multi-master Gerrit installation, the
upgrade is done in 2 steps:
- part 1 (this change):
* always write to both backends (database and git)
* a configuration option (user.readStarredChangesFromGit) decides if
the starred changes are read from database or git (default:
database)
* upgraded instances write to both backends, old instances only
read/write from/to the database
* after upgrading all instances (all still read from the database)
run a batch to copy all starred changes from the database to git
* update all instances to read from git
* make sure all instances use the new schema version
- part 2 (next change):
* bump the database schema version
* migrate the starred changes from database to git (for single
instance Gerrit servers)
* delete the database table
* delete the user.readStarredChangesFromGit config option
The user.readStarredChangesFromGit configuration options is replacing
the global readAccounts bit from NotesMigration in
StarredChangesUtil. This way we can migrate the starred changes
already now while other account data is still in the database.
Change-Id: Iac4f68ea6e0c65b589de25013bfffdcd0fca0d38
Signed-off-by: Edwin Kempin <ekempin@google.com>