Browse Source

fix heap init

pull/5768/head
chrislu 6 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) glog.Errorf("Unexpected! failed to find iterator for filer %s", filerId)
continue 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 // 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{ heap.Push(v.pq, &LogEntryItem{
Entry: next, Entry: next,
filer: filerId, filer: filerId,
}) })
} }
}
return nil return nil
} }

Loading…
Cancel
Save