rsyslog/backport-Fix-legacy-ActionQueueDiscardMark-parameter.patch

47 lines
1.9 KiB
Diff
Raw Normal View History

From 2feac271cadb4cc915aa279ec1986fc2d7b8c4b0 Mon Sep 17 00:00:00 2001
From: Cropi <alakatos@redhat.com>
Date: Tue, 26 Nov 2024 13:13:28 +0100
Subject: [PATCH] Fix legacy $ActionQueueDiscardMark parameter
If the $ActionQueueSize legacy parameter was configured
with a much value higher than the default, the queueDiscardMark
option was not automatically adjusted to represent 98% of
the actual queue size. This caused a misalignment issue,
which does not occur when using the RainerScript syntax.
Fixes #5399
---
action.c | 2 +-
runtime/rsconf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/action.c b/action.c
index 5e94ed207..e377c7420 100644
--- a/action.c
+++ b/action.c
@@ -291,7 +291,7 @@ actionResetQueueParams(void)
cs.iActionQueueDeqBatchSize = 16; /* default batch size */
cs.iActionQHighWtrMark = -1; /* high water mark for disk-assisted queues */
cs.iActionQLowWtrMark = -1; /* low water mark for disk-assisted queues */
- cs.iActionQDiscardMark = 980; /* begin to discard messages */
+ cs.iActionQDiscardMark = -1; /* begin to discard messages */
cs.iActionQDiscardSeverity = 8; /* discard warning and above */
cs.iActionQueueNumWorkers = 1; /* number of worker threads for the mm queue above */
cs.iActionQueMaxFileSize = 1024*1024;
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index 68a4de4e0..71b31be3c 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -246,7 +246,7 @@ static void cnfSetDefaults(rsconf_t *pThis)
pThis->globals.mainQ.iMainMsgQueueSize = 100000;
pThis->globals.mainQ.iMainMsgQHighWtrMark = 80000;
pThis->globals.mainQ.iMainMsgQLowWtrMark = 20000;
- pThis->globals.mainQ.iMainMsgQDiscardMark = 98000;
+ pThis->globals.mainQ.iMainMsgQDiscardMark = -1;
pThis->globals.mainQ.iMainMsgQDiscardSeverity = 8;
pThis->globals.mainQ.iMainMsgQueueNumWorkers = 2;
pThis->globals.mainQ.MainMsgQueType = QUEUETYPE_FIXED_ARRAY;
--
2.33.0