Uh oh!
There was an error while loading. Please reload this page.
[bugfix](k8s) fix log output for K8S environment in cloud and add unit tests - #60490
Merged
Conversation
…t tests K8S uses stdout to capture logs. When service crashes, it tries to output crash stack to .out file. Previously, it could not output to .out file correctly. This patch standardizes the log output behavior for both BE and Cloud components: 1. --daemon mode: output logs to .info file and crash stack to .out file 2. --console mode: 2.1 enable_file_logger = true: output all logs to console (stdout) and to .info file, crash stack to .out file 2.2 enable_file_logger = false: output all logs to console (stdout) and crash stack to .out file Changes: - Implement StdoutLogSink for custom log format output to stdout in K8S - Modify console mode redirection in start scripts to separate stdout/stderr - Add shutdown_logging() function to properly clean up LogSink resources - Add shutdown_logging() calls in main() functions for graceful shutdown - Add comprehensive unit tests for both Cloud and BE components This ensures crash stack is always saved to .out file for debugging, while normal logs can be captured by K8S logging infrastructure.
deardeng
requested review from
dataroaring, gavinchou and w41ter
as code ownersFebruary 4, 2026 07:28
hello-stephen
commented
Feb 4, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
deardeng
commented
Feb 4, 2026
ContributorAuthor
run buildall |
deardengforce-pushed
the
fix-cloud-log-console
branch
3 times, most recently
from
February 4, 2026 10:51
549c6fe to
49a3cf7Comparedeardengforce-pushed
the
fix-cloud-log-console
branch
from
February 4, 2026 15:29
49a3cf7 to
957cd28Comparedeardeng
commented
Feb 4, 2026
ContributorAuthor
run buildall |
doris-robot
commented
Feb 4, 2026
TPC-H: Total hot run time: 31755 ms |
doris-robot
commented
Feb 4, 2026
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
doris-robot
commented
Feb 4, 2026
ClickBench: Total hot run time: 28.62 s |
doris-robot
commented
Feb 4, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Feb 4, 2026
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
gavinchou
approved these changes
Feb 10, 2026
Contributor
PR approved by at least one committer and no changes requested. |
Contributor
PR approved by anyone and no changes requested. |
morningman
approved these changes
Feb 10, 2026
Uh oh!
There was an error while loading. Please reload this page.
github-actionsBot
pushed a commit
that referenced
this pull request
Feb 11, 2026
…t tests (#60490) K8S uses stdout to capture logs. When service crashes, it tries to output crash stack to .out file. Previously, it could not output to .out file correctly. This patch standardizes the log output behavior for both BE and Cloud components: 1. --daemon mode: output logs to .info file and crash stack to .out file 2. --console mode: 2.1 enable_file_logger = true: output all logs to console (stdout) and to .info file, crash stack to .out file 2.2 enable_file_logger = false: output all logs to console (stdout) and crash stack to .out file Changes: - Implement StdoutLogSink for custom log format output to stdout in K8S - Modify console mode redirection in start scripts to separate stdout/stderr - Add shutdown_logging() function to properly clean up LogSink resources - Add shutdown_logging() calls in main() functions for graceful shutdown - Add comprehensive unit tests for both Cloud and BE components This ensures crash stack is always saved to .out file for debugging, while normal logs can be captured by K8S logging infrastructure.
ybtsdst pushed a commit
to ybtsdst/doris
that referenced
this pull request
Feb 27, 2026
… and add unit tests apache#60490 (apache#60678) Cherry-picked from apache#60490 Co-authored-by: deardeng <dengxin@selectdb.com>
16 tasks
gavinchou pushed a commit
that referenced
this pull request
Apr 1, 2026
due to #60490, ms not print ms log in k8s `start.sh --conf=/opt/apache/doris/ms/conf/doris_cloud.conf --console`
github-actionsBot
pushed a commit
that referenced
this pull request
Apr 1, 2026
due to #60490, ms not print ms log in k8s `start.sh --conf=/opt/apache/doris/ms/conf/doris_cloud.conf --console`
github-actionsBot
pushed a commit
that referenced
this pull request
Apr 1, 2026
due to #60490, ms not print ms log in k8s `start.sh --conf=/opt/apache/doris/ms/conf/doris_cloud.conf --console`
morningman pushed a commit
that referenced
this pull request
Apr 2, 2026
due to #60490, ms not print ms log in k8s `start.sh --conf=/opt/apache/doris/ms/conf/doris_cloud.conf --console`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
K8S uses stdout to capture logs. When service crashes, it tries to output crash stack to .out file. Previously, it could not output to .out file correctly. This patch standardizes the log output behavior for both BE and Cloud components:
Changes:
This ensures crash stack is always saved to .out file for debugging, while normal logs can be captured by K8S logging infrastructure.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)