Description
I’ve encountered the same issue described in #2439, and it seems to still be reproducible in the latest version of Poco. The problem persists even after updating to the latest release, and I am able to consistently reproduce it.
Steps To Reproduce
logging.channels.c3.class = FileChannel
logging.channels.c3.path = /usr/data/abc.log
logging.channels.c3.rotation = 1M
logging.channels.c3.purgeCount = 2
logging.channels.c3.flush = false
logging.channels.c3.archive = number
logging.channels.c3.formatter = f1
logging.channels.c3.compress = true
Expected behavior
Expect that rotated log count is consistent when compression enabled.
Actual behavior
When FileChannel compression is enabled, we sometimes see only one file being retained instead of two.
OS Type and Version
Ubuntu 22.04.5 LTS
POCO Version
1.14.0