runservice readdb: also resync changegroups
This commit is contained in:
parent
19877e679c
commit
da6aefa7e2
|
@ -222,7 +222,7 @@ func (r *ReadDB) SyncRDB(ctx context.Context) error {
|
|||
}
|
||||
}
|
||||
|
||||
// use the same revision
|
||||
// sync changegroups, use the same revision of previous operations
|
||||
key = common.EtcdChangeGroupsDir
|
||||
continuation = nil
|
||||
for {
|
||||
|
@ -627,6 +627,18 @@ func (r *ReadDB) SyncObjectStorage(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.insertChangeGroupRevisionOST(tx, changeGroupID, changeGroupRevision); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue