correctly report volume with input/output error to master (#6790)
* correctly capture io error and report to master * code fix * check io error by error.Is --------- Co-authored-by: dongxu_feng <dongxu_feng@intsig.net>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"syscall"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/backend"
|
||||
@@ -23,7 +24,7 @@ func (v *Volume) checkReadWriteError(err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
if err.Error() == "input/output error" {
|
||||
if errors.Is(err, syscall.EIO) {
|
||||
v.lastIoError = err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user