summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-04-23 11:51:33 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-04-23 11:51:33 +0200
commit6feb86688546aff2d957e27d8516143b256371c3 (patch)
treece3aad220113adbe8ec3f45c31e304fa841f6caf /runtime/queue.c
parentfeddb7ea18769399ce53e3958d5c4a0b68e964bc (diff)
parent925a5e34718cc842cb7e7ea6a5c8e8e8fbeb25dd (diff)
downloadrsyslog-6feb86688546aff2d957e27d8516143b256371c3.tar.gz
rsyslog-6feb86688546aff2d957e27d8516143b256371c3.tar.xz
rsyslog-6feb86688546aff2d957e27d8516143b256371c3.zip
Merge branch 'master' into multi-dequeue
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 4e37a0c2..c5f9df81 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -1270,8 +1270,8 @@ rsRetVal qqueueConstruct(qqueue_t **ppThis, queueType_t qType, int iWorkerThread
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
/* set some water marks so that we have useful defaults if none are set specifically */
- pThis->iFullDlyMrk = (iMaxQueueSize < 100) ? iMaxQueueSize : 100; /* 100 should be far sufficient */
- pThis->iLightDlyMrk = iMaxQueueSize - (iMaxQueueSize / 100) * 70; /* default 70% */
+ pThis->iFullDlyMrk = iMaxQueueSize - (iMaxQueueSize / 100) * 3; /* default 97% */
+ pThis->iLightDlyMrk = iMaxQueueSize - (iMaxQueueSize / 100) * 30; /* default 70% */
pThis->lenSpoolDir = strlen((char*)pThis->pszSpoolDir);
pThis->iMaxFileSize = 1024 * 1024; /* default is 1 MiB */
@@ -2178,12 +2178,12 @@ qqueueEnqObj(qqueue_t *pThis, flowControl_t flowCtlType, void *pUsr)
*/
if(flowCtlType == eFLOWCTL_FULL_DELAY) {
while(pThis->iQueueSize >= pThis->iFullDlyMrk) {
- dbgoprint((obj_t*) pThis, "enqueueMsg: FullDelay mark reached for full delayble message - blocking.\n");
+ dbgoprint((obj_t*) pThis, "enqueueMsg: FullDelay mark reached for full delayable message - blocking.\n");
pthread_cond_wait(&pThis->belowFullDlyWtrMrk, pThis->mut); /* TODO error check? But what do then? */
}
} else if(flowCtlType == eFLOWCTL_LIGHT_DELAY) {
if(pThis->iQueueSize >= pThis->iLightDlyMrk) {
- dbgoprint((obj_t*) pThis, "enqueueMsg: LightDelay mark reached for light delayble message - blocking a bit.\n");
+ dbgoprint((obj_t*) pThis, "enqueueMsg: LightDelay mark reached for light delayable 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? */
}