Skip to content

branch-4.0: [bugfix](k8s) fix Log4jConfig class loading before Config.init in console mode #60531#60750

Open
github-actions[bot] wants to merge 1 commit intobranch-4.0from
auto-pick-60531-branch-4.0
Open

branch-4.0: [bugfix](k8s) fix Log4jConfig class loading before Config.init in console mode #60531#60750
github-actions[bot] wants to merge 1 commit intobranch-4.0from
auto-pick-60531-branch-4.0

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #60531

…sole mode (#60531)

When running FE in console mode, `Log4jConfig.foreground = true` was
executed before `Config.init()`, which triggers Log4jConfig class
loading too early. The static block in Log4jConfig calls
`getXmlConfByStrategy()` reading `Config.log_rollover_strategy`, but
fe.conf has not been loaded yet, so it always gets the default value
"age" regardless of the actual config.

In daemon mode this is not an issue because Log4jConfig is first
referenced at `initLogging()` which is called after `Config.init()`.

Fix: move the `Log4jConfig.foreground = true` assignment to after
`Config.init()` and before `Log4jConfig.initLogging()`, ensuring the
static block sees the correct config values from fe.conf.
@github-actions github-actions bot requested a review from yiguolei as a code owner February 13, 2026 16:32
@Thearas
Copy link
Contributor

Thearas commented Feb 13, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Feb 13, 2026
@Thearas
Copy link
Contributor

Thearas commented Feb 13, 2026

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants