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
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.

1 participant