els0r / goProbe

High-performance IP packet metadata aggregation and efficient storage and querying of flows
GNU General Public License v2.0
12 stars 4 forks source link

Error in `walkFN` for `DBWorkManager` is ignored #254

Closed fako1024 closed 8 months ago

fako1024 commented 12 months ago

When looking at DBWorkManager.go as part of #213 I realized that in this call:

numDirs, err := w.walkDB(tFirst, tLast, walkFunc)

the returned err is neither checked nor logged, which could lead to unexpected behavior if e.g. reading a directory fails or something like that (because it will just output less data, silently skipping over the error).

This has to be fixed as part of #213 (because I need to return / handle a specific error in that path) but I'm raising this issue so we don't forget it in case we decide to forego / skip said issue and for some reason the PR doesn't make it into main.