diff --git a/internal/services/runservice/scheduler/readdb/readdb.go b/internal/services/runservice/scheduler/readdb/readdb.go index 6dd6c02..b2f960b 100644 --- a/internal/services/runservice/scheduler/readdb/readdb.go +++ b/internal/services/runservice/scheduler/readdb/readdb.go @@ -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 })