nickva commented on code in PR #5666:
URL: https://github.com/apache/couchdb/pull/5666#discussion_r2373353836
##########
src/couch/src/couch_file.erl:
##########
@@ -621,7 +621,7 @@ handle_info({'DOWN', Ref, process, _Pid, _Info},
#file{db_monitor = Ref} = File)
false -> {noreply, File}
end.
-format_status(_Opt, [PDict, #file{} = File]) ->
+format_status([PDict, #file{} = File]) ->
Review Comment:
> Interesting that OTP has an undocumented callback
[Mod:system_get_state/1](https://github.com/erlang/otp/blame/6d3202747f78850325fa5fd968e5dd661a18932b/lib/stdlib/src/sys.erl#L960).
That's pretty interesting, I guess it's there to return a state for both
get_state/1 and get_status/1? However, I am hesitant to use any undocumented
features. Are you thinking we should use that for formatting the state, so it
formats both the state and the status?
> I think we can rewrite the format_status to use the filepath field.
But why rewrite it and not remove it? The default get_status has the
filepath in the state already. Pretty sure that's that default behavior.
> Someone would need to test it to make sure the path is propagated to the
logs on termination.
Good point but that's a different issue. I would bet couch_log_formatter and
other couch_log bits have long been broken since there were quite a few changes
to the logging and gen_server behavior upstream in releases since 17 or 20
whenever couch_log was created.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]