[Log] Log once in local node by default#37568
Conversation
Signed-off-by: yewentao256 <zhyanwentao@126.com>
There was a problem hiding this comment.
Code Review
The pull request changes the default logging scope for debug_once, info_once, and warning_once methods from "process" to "local". This means that by default, these logging calls will now only be executed on the local first rank (is_local_first_rank()) instead of once per process. While the intent is to reduce duplicate logs, changing the default for info_once and especially warning_once to a more restrictive scope could lead to important information or warnings being missed on other local ranks. This could make debugging distributed setups significantly harder, as critical events might only be visible on a single rank. It is generally safer for info and warning level logs to be visible across all relevant processes unless explicitly configured otherwise.
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Monishver Chandrasekaran <monishverchandrasekaran@gmail.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Vinay Damodaran <vrdn@hey.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: EricccYang <yangyang4991@gmail.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Purpose
If we call
log_once, namely we want to log once instead of having duplicate logs per process.We have a lot of fixes like #37313
But maybe switching to "local" by default be a better idea.