Github user remkop commented on the issue:
https://github.com/apache/logging-log4j2/pull/87
Roman, I started to review your patch. Initial feedback below (still
reading):
* MemoryMappedFileManager::switchRegion should not throw Error: generally a
logging problem should not bring down the application. See also the
{{ignoreExceptions}}
[configuration|https://logging.apache.org/log4j/2.x/manual/appenders.html#MemoryMappedFileAppender]
attribute that allows applications to choose to receive logging exceptions.
* What do you think of the idea of moving some of the newly added classes
to the core.async package? ThreadHints, ThreadHintsMH,
UninterruptibleCountDownLatch and UnlockedAwaitableReentrantLock. Perhaps also
some of MemoryMappedfileManager's inner classes (need to look more at these)?
* in MemoryMappedfileManager::getFileManager, please call
AbstractManager::narrow on the result of super.getManager(). This will show
users a better error message when log4j2 is misconfigured (LOG4J2-1908). This
is a recent change I made, may have introduced a (small) merge conflict, sorry
about that.
* Question: The javadoc for
MemoryMappedFileManager::SPIN_WAIT_MINIMIZING_LOCKED_WRITE_THRESHOLD mentions a
32 KB threshold for stack traces. What happens if a user logs a stack trace
exceeding this length?
... still reading, also looking forward to tests & perf results.
On the topic of perf testing: I'd be interested to see a throughput
comparison of the new MemoryMappedFileAppender vs. RandomAccessFileAppender and
FileAppender with a varying number of logging threads (1, 2, 4, 8, 16, 32, 64
if possible).
A throughput comparison with Async Loggers would also be interesting but be
aware that JMH quickly fills up the disruptor ringbuffer. To solve this,
configure with a non-existing appender (so the background thread essentially
logs to /dev/null). See
/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/AsyncLoggersBenchmark.java
Some indication of latency behaviour would also be interesting.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---