Skip to content

Commit

Permalink
buffer existing label scan
Browse files Browse the repository at this point in the history
  • Loading branch information
DocSavage committed Feb 15, 2024
1 parent 34d31d8 commit 088c1cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datatype/labelmap/labelidx.go
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ func (d *Data) writeExistingIndices(ctx *datastore.VersionedCtx, w http.Response

minTKey := NewLabelIndexTKey(0)
maxTKey := NewLabelIndexTKey(math.MaxUint64)
keyChan := make(storage.KeyChan)
keyChan := make(storage.KeyChan, 1000)
go func() {
store.SendKeysInRange(ctx, minTKey, maxTKey, keyChan)
close(keyChan)
Expand Down Expand Up @@ -1811,6 +1811,9 @@ func (d *Data) writeExistingIndices(ctx *datastore.VersionedCtx, w http.Response
fmt.Fprintf(w, "%d", label)
}
numExist++
if numExist%10000 == 0 {
timedLog.Infof("Found %d existing labels, currently at %d", numExist, label)
}
}
}
if w != nil {
Expand Down

0 comments on commit 088c1cb

Please sign in to comment.