diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 13:00:50 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 13:00:50 +0200 |
commit | 2ff697fe8de04ecd99e8470a7e7d8d1716980240 (patch) | |
tree | 3c55bfec459547fbb13faca47e506e825b287510 | |
parent | 1229143ca3d194bb0daaa5252809d59ee0c3a0bf (diff) | |
parent | 25b0036fcb6ea54251fcb82e245366bbbaa71e58 (diff) | |
download | rsyslog-2ff697fe8de04ecd99e8470a7e7d8d1716980240.tar.gz rsyslog-2ff697fe8de04ecd99e8470a7e7d8d1716980240.tar.xz rsyslog-2ff697fe8de04ecd99e8470a7e7d8d1716980240.zip |
Merge branch 'master' into perf
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | runtime/queue.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -306,6 +306,9 @@ Version 3.18.5 (rgerhards), 2008-10-?? because getnameinfo() is not cancel-safe, but was not guarded against being cancelled. pthread_cancel() is routinely being called during HUP processing. +- bugfix[minor]: if queue size reached light_delay mark, enqueuing + could potentially be blocked for a longer period of time, which + was not the behaviour desired. - doc bugfix: $ActionExecOnlyWhenPreviousIsSuspended was still misspelled as $...OnlyIfPrev... in some parts of the documentation. Thanks to Lorenzo M. Catucci for reporting this bug. diff --git a/runtime/queue.c b/runtime/queue.c index 2d1bf7e3..b0043ef5 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -2149,7 +2149,7 @@ queueEnqObj(queue_t *pThis, flowControl_t flowCtlType, void *pUsr) pthread_cond_wait(&pThis->belowFullDlyWtrMrk, pThis->mut); /* TODO error check? But what do then? */ } } else if(flowCtlType == eFLOWCTL_LIGHT_DELAY) { - while(pThis->iQueueSize >= pThis->iLightDlyMrk) { + if(pThis->iQueueSize >= pThis->iLightDlyMrk) { dbgoprint((obj_t*) pThis, "enqueueMsg: LightDelay mark reached for light delayble message - blocking a bit.\n"); timeoutComp(&t, 1000); /* 1000 millisconds = 1 second TODO: make configurable */ pthread_cond_timedwait(&pThis->belowLightDlyWtrMrk, pThis->mut, &t); /* TODO error check? But what do then? */ |