Browse Source

skip file with invalid format

pull/7149/head
chrislu 2 months ago
parent
commit
62ed2366f3
  1. 4
      weed/filer/filer_notify_read.go

4
weed/filer/filer_notify_read.go

@ -221,6 +221,10 @@ func (c *LogFileEntryCollector) collectMore(v *OrderedLogVisitor) (err error) {
continue continue
} }
filerId := getFilerId(hourMinuteEntry.Name()) filerId := getFilerId(hourMinuteEntry.Name())
if filerId == "" {
glog.Warningf("Invalid log file name format: %s", hourMinuteEntry.Name())
continue // Skip files with invalid format
}
iter, found := v.perFilerIteratorMap[filerId] iter, found := v.perFilerIteratorMap[filerId]
if !found { if !found {
iter = newLogFileQueueIterator(c.f.MasterClient, util.NewQueue[*LogFileEntry](), c.startTsNs, c.stopTsNs) iter = newLogFileQueueIterator(c.f.MasterClient, util.NewQueue[*LogFileEntry](), c.startTsNs, c.stopTsNs)

Loading…
Cancel
Save