channeldb: skip dry run mode for optional migrations

This commit is contained in:
yyforyongyu 2022-07-12 20:39:49 +08:00
parent b391503ddf
commit ac6e1a836c
No known key found for this signature in database
GPG key ID: 9BCD95C4FF296868

View file

@ -1422,6 +1422,14 @@ func (d *DB) syncVersions(versions []mandatoryVersion) error {
//
// NOTE: only support the prune_revocation_log optional migration atm.
func (d *DB) applyOptionalVersions(cfg OptionalMiragtionConfig) error {
// TODO(yy): need to design the db to support dry run for optional
// migrations.
if d.dryRun {
log.Info("Skipped optional migrations as dry run mode is not " +
"supported yet")
return nil
}
om, err := d.fetchOptionalMeta()
if err != nil {
if err == ErrMetaNotFound {