Skip to content

Add support for max compression delay in compression actions#4071

Merged
vy merged 9 commits into
apache:2.xfrom
ramanathan1504:issue-4012
May 28, 2026
Merged

Add support for max compression delay in compression actions#4071
vy merged 9 commits into
apache:2.xfrom
ramanathan1504:issue-4012

Conversation

@ramanathan1504
Copy link
Copy Markdown
Contributor

@ramanathan1504 ramanathan1504 commented Mar 19, 2026

Fixes #4012

Changes

  • Added maxCompressionDelay parameter to GzCompressAction and ZipCompressAction
  • Extended FileExtension to support max compression delay configuration
  • Updated DefaultRolloverStrategy to pass compression delay settings to compression actions
  • Added backward-compatible constructors for existing code
  • Comprehensive test coverage for compression delay functionality

Files Modified

  • Core Implementation

    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FileExtension.java
    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java
    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java
    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
  • Tests

    • log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/FileExtensionCompressDelayTest.java (new)
    • log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressActionTest.java (new)
    • log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressActionTest.java (new)

@ramanathan1504 ramanathan1504 changed the title Add support for max compression delay in compression actions [LOG4J2-4012] Add support for max compression delay in compression actions Mar 19, 2026
@vy vy changed the title [LOG4J2-4012] Add support for max compression delay in compression actions Add support for max compression delay in compression actions Apr 28, 2026
@vy vy assigned vy and ramanathan1504 and unassigned vy and ramanathan1504 Apr 29, 2026
Copy link
Copy Markdown
Member

@vy vy left a comment

Choose a reason for hiding this comment

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

@ramanathan1504, thanks for taking the time. See my remarks and please add a changelog entry.

TBH, I find your submission very sloppy in the sense that it appears to be generated using an LLM prompt and then without a review from your side pushed on us for review. Please, don't do this. Review your changes before asking review from others.

Comment thread src/changelog/2.26.0/plugin_processor_min_allowed_message_kind.xml
Comment thread src/site/antora/modules/ROOT/pages/manual/plugins.adoc
@github-project-automation github-project-automation Bot moved this to Changes requested in Log4j pull request tracker Apr 29, 2026
@ramanathan1504
Copy link
Copy Markdown
Contributor Author

@ramanathan1504, thanks for taking the time. See my remarks and please add a changelog entry.

TBH, I find your submission very sloppy in the sense that it appears to be generated using an LLM prompt and then without a review from your side pushed on us for review. Please, don't do this. Review your changes before asking review from others.

ok next time i will aware about this.. i think its happened couple of time..thanks

@vy
Copy link
Copy Markdown
Member

vy commented May 18, 2026

@ramanathan1504, you need to move @since and @Version tags to 2.27.0, FYI.

@ramanathan1504
Copy link
Copy Markdown
Contributor Author

@ramanathan1504, you need to move @since and @Version tags to 2.27.0, FYI.

ok

Copy link
Copy Markdown
Member

@vy vy left a comment

Choose a reason for hiding this comment

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

@ramanathan1504, could you update the documentation to reflect the newly added maxCompressionDelaySeconds configuration attribute, please?

@ramanathan1504
Copy link
Copy Markdown
Contributor Author

@ramanathan1504, could you update the documentation to reflect the newly added maxCompressionDelaySeconds configuration attribute, please?

sure i will add that 👍🏾

@github-project-automation github-project-automation Bot moved this from Changes requested to Approved in Log4j pull request tracker May 28, 2026
@vy vy enabled auto-merge (squash) May 28, 2026 08:59
@vy vy merged commit 446d2ba into apache:2.x May 28, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Merged in Log4j pull request tracker May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Proactively deferring compression can reduce disk I/O pressure.

3 participants