-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
SERVER-70970 added logging of all failures of remove(pipeAbsolutePath) in named_pipe_posix.cpp, but most of the time of the ctor execution these are from attempts to remove a pipe that did not exist, which is the most common and expected behavior:
> _writeTestPipe("one", 1000); {"t":\{"$date":"2022-12-29T20:25:15.397Z"},"s":"I", "c":"TEST", "id":7097000, "ctx":"thread7","msg":"Failed to remove", "attr":\{"error":"Failed to remove /tmp/one: error code = 2, No such file or directory"}}
This message should be suppressed in the case where the file did not exist in the ctor, else it makes it look like the _writeTestPipe() function failed in mongo shell, when actually it succeeded.
Update:
The log message level "s":"I" indicates that it's not an error but some users might think it's a real error since the log message has the error field. To avoid any possible confusion, it would be better to log an error message with ERROR level only in the dtor & all errors and the ctor & errors other than ENOENT error, but not in the ctor & ENOENT case. Otherwise, users may miss important error message which may be a clue about what went wrong.