Browse Source

fix heap init

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

10
weed/filer/filer_notify_read.go

@ -226,18 +226,20 @@ func (c *LogFileEntryCollector) collectMore(v *OrderedLogVisitor) (err error) {
glog.Errorf("Unexpected! failed to find iterator for filer %s", filerId)
continue
}
next, err := iter.getNext(v)
if err != nil {
if err == io.EOF {
next, nextErr := iter.getNext(v)
if nextErr != nil {
if nextErr == io.EOF {
// 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)
}
} else {
heap.Push(v.pq, &LogEntryItem{
Entry: next,
filer: filerId,
})
}
}
return nil
}

Loading…
Cancel
Save