refactor(client): not report eio for extent not found error. #1000123658

Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
Victor1319 2025-05-15 20:30:12 +08:00 committed by zhumingze1108
parent 71002fbcf0
commit a20e91c651

View File

@ -400,7 +400,7 @@ func (f *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadR
msg := fmt.Sprintf("Read: ino(%v) req(%v) err(%v) size(%v)", f.info.Inode, req, err, size)
f.super.handleError("Read", msg)
errMetric := exporter.NewCounter("fileReadFailed")
if err == syscall.EOPNOTSUPP || err == syscall.ENOTSUP {
if err == syscall.EOPNOTSUPP || err == syscall.ENOTSUP || strings.Contains(err.Error(), "ExtentNotFoundError") {
errMetric.AddWithLabels(1, map[string]string{exporter.Vol: f.super.volname, exporter.Err: "NOTSUP"})
} else {
errMetric.AddWithLabels(1, map[string]string{exporter.Vol: f.super.volname, exporter.Err: "EIO"})