I have tested this with "LokiAppenderTest.java" after modifying TjahziLogger.java to randomly fix claim=0.
When claim=0, the "LokiAppenderTest.java" test fails after repeatedly printing status logs.
public TjahziLogger log(long timestamp,
LabelSerializer serializedLabels,
ByteBuffer line) {
...
int claim = logBuffer.tryClaim(LOG_MESSAGE_TYPE_ID, requiredSize);
boolean tryToFail = new Random().nextBoolean();
if (tryToFail) {
claim = 0;
}
if (claim > 0) {
putMessageOnRing(
We are loosing logs using this library. We have tried bufferSizeMegabytes="128" but still can reproduce.
https://github.com/tkowalcz/tjahzi/blob/master/core/src/main/java/pl/tkowalcz/tjahzi/TjahziLogger.java#L35
I have tested this with "LokiAppenderTest.java" after modifying TjahziLogger.java to randomly fix claim=0. When claim=0, the "LokiAppenderTest.java" test fails after repeatedly printing status logs.