public class ConfigNotesMigration extends NotesMigration
gerrit.config
.
This class controls the state of the migration according to options in
gerrit.config
. In general, any changes to these options should only
be made by adventurous administrators, who know what they're doing, on
non-production data, for the purposes of testing the NoteDb implementation.
Changing options quite likely requires re-running RebuildNoteDb
. For
these reasons, the options remain undocumented.
Modifier and Type | Class and Description |
---|---|
static class |
ConfigNotesMigration.Module |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.jgit.lib.Config |
allEnabledConfig() |
boolean |
readAccounts() |
boolean |
readChanges()
Read changes from NoteDb.
|
boolean |
readChangeSequence()
Read sequential change ID numbers from NoteDb.
|
boolean |
writeAccounts() |
protected boolean |
writeChanges()
Write changes to NoteDb.
|
commitChangeWrites, enabled, failChangeWrites, failOnLoad
public static org.eclipse.jgit.lib.Config allEnabledConfig()
protected boolean writeChanges()
NotesMigration
Updates to change data are written to NoteDb refs, but ReviewDb is still the source of truth. Change data will not be written unless the NoteDb refs are already up to date, and the write path will attempt to rebuild the change if not.
If false, the behavior when attempting to write depends on
readChanges()
. If readChanges() = false
, writes to NoteDb
are simply ignored; if true
, any attempts to write will generate an
error.
writeChanges
in class NotesMigration
public boolean readChanges()
NotesMigration
Change data is read from NoteDb refs, but ReviewDb is still the source of truth. If the loader determines NoteDb is out of date, the change data in NoteDb will be transparently rebuilt. This means that some code paths that look read-only may in fact attempt to write.
If true and writeChanges() = false
, changes can still be read from
NoteDb, but any attempts to write will generate an error.
readChanges
in class NotesMigration
public boolean readChangeSequence()
NotesMigration
If true, change IDs are read from refs/sequences/changes
in
All-Projects. If false, change IDs are read from ReviewDb's native
sequences.
readChangeSequence
in class NotesMigration
public boolean writeAccounts()
writeAccounts
in class NotesMigration
public boolean readAccounts()
readAccounts
in class NotesMigration