From 080cabf67da99ad12ebfbbc224df9919ef90fd3e Mon Sep 17 00:00:00 2001 From: skrichbets Date: Thu, 3 Aug 2023 15:52:18 +0300 Subject: [PATCH] increase minimum space in input queue to 50% --- .../datorama/oss/timbermill/cron/EventsPersistentFetchJob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/cron/EventsPersistentFetchJob.java b/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/cron/EventsPersistentFetchJob.java index d7352c5b..7a2ae3c8 100644 --- a/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/cron/EventsPersistentFetchJob.java +++ b/timbermill-java/timbermill-local/src/main/java/com/datorama/oss/timbermill/cron/EventsPersistentFetchJob.java @@ -69,7 +69,7 @@ public class EventsPersistentFetchJob implements Job { } private boolean hasEnoughRoomLeft(BlockingQueue eventsQueue) { - double threshold = (eventsQueue.remainingCapacity() + eventsQueue.size()) * 0.2; // Only when queue had at least 20% free we will start adding persistent events + double threshold = (eventsQueue.remainingCapacity() + eventsQueue.size()) * 0.5; // Only when queue had at least 50% free we will start adding persistent events return eventsQueue.remainingCapacity() > threshold; }