configstore readdb: also resync changegroups

This commit is contained in:
Simone Gotti 2019-04-29 10:15:44 +02:00
parent 2634f7a3a0
commit 19877e679c
1 changed files with 12 additions and 0 deletions

View File

@ -368,6 +368,18 @@ func (r *ReadDB) SyncRDB(ctx context.Context) error {
} }
} }
// sync changegroups, use the same revision of previous operations
changeGroupsRevisions, err := r.dm.ListEtcdChangeGroups(ctx, revision)
if err != nil {
return err
}
for changeGroupID, changeGroupRevision := range changeGroupsRevisions {
if err := r.insertChangeGroupRevision(tx, changeGroupID, changeGroupRevision); err != nil {
return err
}
}
return nil return nil
}) })