jetty/jetty.project

Review RolloverFileOutputStream locking

Open

#5,092 opened on Jul 29, 2020

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Java (1,913 forks)batch import
Help WantedLow PriorityPinned

Repository metrics

Stars
 (3,701 stars)
PR merge metrics
 (Avg merge 6d 14h) (48 merged PRs in 30d)

Description

Spawned by #5083.

Jetty version 9.4.x

Description RolloverFileOutputStream locking should be improved/removed.

Currently it locks on a class lock for no reasons, since __rollover is only ever written in the constructor (and thus could be final).

There should be some synchronization between the writes and the scheduled task (so that the file can be swapped without losing log lines), but the class locks seem unnecessary.

Contributor guide