diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-07 18:40:30 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-07 18:40:30 +0200 |
commit | 5625dbd1b6cddb8b84d8a3d8c60f95eaaa49be66 (patch) | |
tree | 3071fa0c07fdc7bc1bc2fa93af302bd3df47d943 /runtime/wtp.c | |
parent | 92ec206279e29d12d3d44e51280485d641579e41 (diff) | |
download | rsyslog-5625dbd1b6cddb8b84d8a3d8c60f95eaaa49be66.tar.gz rsyslog-5625dbd1b6cddb8b84d8a3d8c60f95eaaa49be66.tar.xz rsyslog-5625dbd1b6cddb8b84d8a3d8c60f95eaaa49be66.zip |
bugfix and testbench improvements
- bugfix: solved potential (temporary) stall of messages when the queue was
almost empty and few new data added (caused testbench to sometimes hang!)
- fixed some race condition in testbench
- added more elaborate diagnostics to parts of the testbench
- solved a potential race inside the queue engine
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r-- | runtime/wtp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c index 4524e0c3..40d031dc 100644 --- a/runtime/wtp.c +++ b/runtime/wtp.c @@ -413,6 +413,7 @@ wtpAdviseMaxWorkers(wtp_t *pThis, int nMaxWrkr) ISOBJ_TYPE_assert(pThis, wtp); +int nMaxWrkrTmp = nMaxWrkr; if(nMaxWrkr == 0) FINALIZE; @@ -420,6 +421,7 @@ wtpAdviseMaxWorkers(wtp_t *pThis, int nMaxWrkr) nMaxWrkr = pThis->iNumWorkerThreads; nMissing = nMaxWrkr - ATOMIC_FETCH_32BIT(pThis->iCurNumWrkThrd); +dbgprintf("wtpAdviseMaxWorkers, nmax: %d, curr %d, missing %d\n", nMaxWrkrTmp, pThis->iNumWorkerThreads, nMissing); if(nMissing > 0) { DBGPRINTF("%s: high activity - starting %d additional worker thread(s).\n", wtpGetDbgHdr(pThis), nMissing); @@ -428,6 +430,7 @@ wtpAdviseMaxWorkers(wtp_t *pThis, int nMaxWrkr) CHKiRet(wtpStartWrkr(pThis)); } } else { +dbgprintf("YYY: adivse signal cond busy"); pthread_cond_signal(pThis->pcondBusy); } |