diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-05 18:22:21 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-05 18:22:21 +0100 |
commit | 7906ee389c270bc96cfdf261c348c57b6dd33cb3 (patch) | |
tree | 63e5ca22fc47f4509d4e01050bf28351bce0aac3 /runtime/queue.c | |
parent | a056dad8b359ebab1c34c94b763b5519b066cb76 (diff) | |
download | rsyslog-7906ee389c270bc96cfdf261c348c57b6dd33cb3.tar.gz rsyslog-7906ee389c270bc96cfdf261c348c57b6dd33cb3.tar.bz2 rsyslog-7906ee389c270bc96cfdf261c348c57b6dd33cb3.zip |
improved checking of queue config parameters on startup
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 3834343c..409424e7 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2091,16 +2091,17 @@ qqueueStart(qqueue_t *pThis) /* this is the ConstructionFinalizer */ pThis->iMaxQueueSize); } - if(pThis->iFullDlyMrk == -1) + /* we need to do a quick check if our water marks are set plausible. If not, + * we correct the most important shortcomings. + */ + if(pThis->iFullDlyMrk == -1 || pThis->iFullDlyMrk > pThis->iMaxQueueSize) pThis->iFullDlyMrk = pThis->iMaxQueueSize - (pThis->iMaxQueueSize / 100) * 3; /* default 97% */ - if(pThis->iLightDlyMrk == -1) + if(pThis->iLightDlyMrk == -1 || pThis->iLightDlyMrk > pThis->iMaxQueueSize) pThis->iLightDlyMrk = pThis->iMaxQueueSize - (pThis->iMaxQueueSize / 100) * 30; /* default 70% */ - - /* we need to do a quick check if our water marks are set plausible. If not, - * we correct the most important shortcomings. TODO: do that!!!! -- rgerhards, 2008-03-14 - */ + if(pThis->iDeqBatchSize > pThis->iMaxQueueSize) + pThis->iDeqBatchSize = pThis->iMaxQueueSize; /* finalize some initializations that could not yet be done because it is * influenced by properties which might have been set after queueConstruct () |