fix(kv): update kv source to use the new forward cursor (#16659)

pull/16669/head
Lyon Hill 2020-01-24 09:46:01 -07:00 committed by GitHub
parent 0fa52eec9d
commit d1c0ddc362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -238,12 +238,12 @@ func (s *Service) forEachSource(ctx context.Context, tx Tx, fn func(*influxdb.So
return err
}
cur, err := b.Cursor()
cur, err := b.ForwardCursor(nil)
if err != nil {
return err
}
for k, v := cur.First(); k != nil; k, v = cur.Next() {
for k, v := cur.Next(); k != nil; k, v = cur.Next() {
s := &influxdb.Source{}
if err := json.Unmarshal(v, s); err != nil {
return err