Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][broker] Make log flushing configurable in Pulsar broker #17591

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Sep 12, 2022

Motivation

Modifications

Make it possible to override the default setting with PULSAR_LOG_IMMEDIATE_FLUSH environment variable.
Setting PULSAR_LOG_IMMEDIATE_FLUSH=true would make logging to flush the logging buffer after each log statement.

Additional context

immediateFlush option documentation: https://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

- by default Pulsar won't flush log statements to disk after each log line. This is problematic while investigating some issues since the broker might crash without the last log lines.
@lhotari lhotari added this to the 2.12.0 milestone Sep 12, 2022
@lhotari lhotari self-assigned this Sep 12, 2022
@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Sep 12, 2022
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nice catch

@merlimat merlimat merged commit e79642c into apache:master Sep 12, 2022
tisonkun pushed a commit to tisonkun/pulsar that referenced this pull request Sep 14, 2022
…ache#17591)

- by default Pulsar won't flush log statements to disk after each log line. This is problematic while investigating some issues since the broker might crash without the last log lines.
lhotari added a commit to datastax/pulsar that referenced this pull request Sep 19, 2022
…ache#17591)

- by default Pulsar won't flush log statements to disk after each log line. This is problematic while investigating some issues since the broker might crash without the last log lines.

(cherry picked from commit e79642c)
@momo-jun
Copy link
Contributor

@lhotari does this improvement have any user impact? If yes, it would help users better understand this improvement with the required docs. Do you have any plans for updating the docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required Your PR changes impact docs and you will update later.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants