jetty/jetty.project

Review RolloverFileOutputStream locking

Aperta

#5092 aperta il 29 lug 2020

 (6 commenti) (0 reazioni) (0 assegnatari)Java (1913 fork)batch import
Help WantedLow PriorityPinned

Metriche repository

Star
 (3701 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor