cambyzju commented on code in PR #31398: URL: https://github.com/apache/doris/pull/31398#discussion_r1502175794
########## be/src/agent/cgroup_cpu_ctl.cpp: ########## @@ -91,6 +91,9 @@ Status CgroupCpuCtl::write_cg_sys_file(std::string file_path, int value, std::st return Status::InternalError<false>("{} write sys file failed", msg); } LOG(INFO) << msg << " success"; + if (-1 == ::close(fd)) { + LOG(WARNING) << "close file fd failed"; Review Comment: 在多线程环境里面,要把两行日志关联起来,其实挺麻烦的。 1、close失败,是个低频操作,冗余打印并没有太大问题; 2、跟93行,日志级别不一样,在WARN日志文件里面,这一行打印几乎没有意义; 3、如果坚持现有的方式,建议这里和93行都把fd打印出来,方便用fd进行关联; -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org