hanahmily commented on code in PR #490: URL: https://github.com/apache/skywalking-banyandb/pull/490#discussion_r1684360547
########## banyand/observability/metrics_system.go: ########## @@ -171,8 +171,7 @@ func collectDisk() { for path := range getPath() { usage, err := disk.Usage(path) if err != nil { - // skip logging the case where the data has not been created - if err.Error() == "no such file or directory" { + if err.Error() != "no such file or directory" { Review Comment: No, checking the error message is not reliable. ```suggestion if _, err := os.Stat(path); err != nil { if !os.IsNotExist(err) { log.Error().Err(err).Msgf("failed to get stat for path: %s", path) } return } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org