Fix dbfs error handling (#36844)

Add tests for opening non-existing files.
This commit is contained in:
wxiaoguang
2026-03-07 00:28:46 +08:00
committed by GitHub
parent f3bdcc58af
commit 2ce71629c3
5 changed files with 91 additions and 49 deletions

View File

@@ -270,7 +270,7 @@ func (s *Service) UpdateLog(
rows := req.Msg.Rows[ack-req.Msg.Index:]
ns, err := actions.WriteLogs(ctx, task.LogFilename, task.LogSize, rows)
if err != nil {
return nil, status.Errorf(codes.Internal, "write logs: %v", err)
return nil, status.Errorf(codes.Internal, "unable to append logs to dbfs file: %v", err)
}
task.LogLength += int64(len(rows))
for _, n := range ns {