mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(client): fix errMsg for aheadRead
close:#1000367076
Signed-off-by: chihe <chihe@oppo.com>
(cherry picked from commit b2498aabf3)
This commit is contained in:
parent
6ee91cd64c
commit
1f27e9bd37
@ -251,7 +251,7 @@ func NewSuper(opt *proto.MountOptions) (s *Super, err error) {
|
||||
EnableAsyncFlush: opt.EnableAsyncFlush,
|
||||
}
|
||||
|
||||
log.LogWarnf("ahead info enable %+v, totalMem %+v, timeout %+v, winCnt %+v", opt.AheadReadEnable, opt.AheadReadTotalMem, opt.AheadReadBlockTimeOut, opt.AheadReadWindowCnt)
|
||||
log.LogInfof("ahead info enable %+v, totalMem %+v, timeout %+v, winCnt %+v", opt.AheadReadEnable, opt.AheadReadTotalMem, opt.AheadReadBlockTimeOut, opt.AheadReadWindowCnt)
|
||||
|
||||
s.ec, err = stream.NewExtentClient(extentConfig)
|
||||
if err != nil {
|
||||
|
||||
@ -1023,7 +1023,7 @@ func parseMountOption(cfg *config.Config) (*proto.MountOptions, error) {
|
||||
available = int64((total - used) / 3)
|
||||
if available < opt.AheadReadTotalMem {
|
||||
opt.AheadReadTotalMem = available
|
||||
syslog.Printf("available ahead read mem: %v\n", available)
|
||||
fmt.Printf("available ahead read mem: %v\n", available)
|
||||
}
|
||||
}
|
||||
if opt.MountPoint == "" || opt.Volname == "" || opt.Owner == "" || opt.Master == "" {
|
||||
|
||||
@ -281,7 +281,7 @@ func (arw *AheadReadWindow) doTask(task *AheadReadTask) {
|
||||
return e, false
|
||||
}
|
||||
if rp.ResultCode != proto.OpOk {
|
||||
err = fmt.Errorf("result code[%v],msg[%v]", rp.ResultCode, string(rp.Data))
|
||||
err = fmt.Errorf("result code[%v],msg[%v]", rp.ResultCode, string(rp.Data[:rp.Size]))
|
||||
return err, false
|
||||
}
|
||||
// update timeStamp to prevent from deleted by timeout
|
||||
|
||||
Loading…
Reference in New Issue
Block a user