Skip to content

[main] Reopen log file when rollover is unsuccessful (#3226 port)#4154

Open
vpelikh wants to merge 1 commit into
apache:mainfrom
vpelikh:GH-3226-port-to-main
Open

[main] Reopen log file when rollover is unsuccessful (#3226 port)#4154
vpelikh wants to merge 1 commit into
apache:mainfrom
vpelikh:GH-3226-port-to-main

Conversation

@vpelikh

@vpelikh vpelikh commented Jun 26, 2026

Copy link
Copy Markdown

Ports #3226 to the main branch (3.x).

Changes

RollingFileManager.java

  • Rename releaseRequiredoutputStreamClosed / asyncActionStarted
  • Rename successsyncActionSuccess
  • Return outputStreamClosed instead of success / bare false — when a rollover's
    synchronous action fails, the output stream has still been closed, so the log
    file must be reopened
  • Semaphore release logic now tracks async action start state explicitly

RollingFileManagerTest.java

  • Updated testSynchronousActionFailure — removed initialTime assertions,
    verifies file content is preserved after failed rollover
  • Added testRolloverOfDeletedFile — verifies that rolling over a deleted file
    correctly reopens the log file

Changelog

  • Added src/changelog/.3.x.x/2592_fix_rollover_file_reopen.xml

Closes: #2592

@vpelikh vpelikh changed the title [main] Reopen log file when rollover is unsuccessful (#3226) [main] Reopen log file when rollover is unsuccessful (#3226 port) Jun 26, 2026
@vpelikh vpelikh mentioned this pull request Jun 26, 2026
27 tasks
Signed-off-by: Vasily Pelikh <2010720+vpelikh@users.noreply.github.com>
@vpelikh
vpelikh force-pushed the GH-3226-port-to-main branch from 8300ae3 to 895ad26 Compare July 16, 2026 07:22

@ramanathan1504 ramanathan1504 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

2 participants