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() |
NoteDbChangeState.PrimaryStorage |
changePrimaryStorage() |
boolean |
disableChangeReviewDb()
Disable ReviewDb access for changes.
|
boolean |
readChanges()
Read changes from NoteDb.
|
boolean |
readChangeSequence()
Read sequential change ID numbers from NoteDb.
|
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 NoteDbChangeState.PrimaryStorage changePrimaryStorage()
changePrimaryStorage
in class NotesMigration
public boolean disableChangeReviewDb()
NotesMigration
When set, ReviewDb operations involving the Changes table become no-ops. Lookups return no results; updates do nothing, as does opening, committing, or rolling back a transaction on the Changes table.
disableChangeReviewDb
in class NotesMigration