Browse Source

fix heap init

pull/5768/head
chrislu 6 months ago
parent
commit
590397229e
  1. 18
      weed/filer/filer_notify_read.go

18
weed/filer/filer_notify_read.go

@ -226,17 +226,19 @@ func (c *LogFileEntryCollector) collectMore(v *OrderedLogVisitor) (err error) {
glog.Errorf("Unexpected! failed to find iterator for filer %s", filerId) glog.Errorf("Unexpected! failed to find iterator for filer %s", filerId)
continue continue
} }
next, err := iter.getNext(v) next, nextErr := iter.getNext(v)
if err != nil { if nextErr != nil {
if err == io.EOF { if nextErr == io.EOF {
// do nothing since the filer has no more log entries // do nothing since the filer has no more log entries
}else {
return fmt.Errorf("failed to get next log entry for %v: %v", entryName, err)
} }
return fmt.Errorf("failed to get next log entry for %v: %v", entryName, err) } else {
heap.Push(v.pq, &LogEntryItem{
Entry: next,
filer: filerId,
})
} }
heap.Push(v.pq, &LogEntryItem{
Entry: next,
filer: filerId,
})
} }
return nil return nil

|||||||
100:0
Loading…
Cancel
Save