diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-20 10:25:02 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-20 10:25:02 +0200 |
commit | ef70e6174d4b373a601b73757ca19bb0f7dd6502 (patch) | |
tree | 50bc958008b9cd4c7faf838e8911acc0e4c089b5 /runtime/queue.c | |
parent | b3978e7f7381c694a30a83c67c3fe2e1acc54207 (diff) | |
download | rsyslog-ef70e6174d4b373a601b73757ca19bb0f7dd6502.tar.gz rsyslog-ef70e6174d4b373a601b73757ca19bb0f7dd6502.tar.xz rsyslog-ef70e6174d4b373a601b73757ca19bb0f7dd6502.zip |
architecture change: queue now always has at least one worker thread
...if not running in direct mode. Previous versions could run without
any active workers. This simplifies the code at a very small expense.
See v5 compatibility note document for more in-depth discussion.
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 9123a3f5..78859e8d 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -298,19 +298,6 @@ TurnOffDAMode(qqueue_t *pThis) ISOBJ_TYPE_assert(pThis, qqueue); ASSERT(pThis->bRunsDA); - - /* if we need to pull any data that we still need from the (child) disk queue, - * now would be the time to do so. At present, we do not need this, but I'd like to - * keep that comment if future need arises. - */ - - /* we need to check if the DA queue is empty because the DA worker may simply have - * terminated due to no new messages arriving. That does not, however, mean that the - * DA queue is empty. If there is still data in that queue, we do nothing and leave - * that for a later incarnation of this function (it will be called multiple times - * during the lifetime of DA-mode, depending on how often the DA worker receives an - * inactivity timeout. -- rgerhards, 2008-01-25 - */ if(getLogicalQueueSize(pThis->pqDA) == 0) { pThis->bRunsDA = 0; /* tell the world we are back in non-DA mode */ /* we destruct the queue object, which will also shutdown the queue worker. As the queue is empty, @@ -319,10 +306,6 @@ TurnOffDAMode(qqueue_t *pThis) //XXX: TODO qqueueDestruct(&pThis->pqDA); /* and now we are ready to destruct the DA queue */ dbgoprint((obj_t*) pThis, "disk-assistance has been turned off, disk queue was empty (iRet %d)\n", iRet); - } else { - /* the queue has data again! */ - dbgprintf("DA queue has data during shutdown, restarting...\n"); - qqueueAdviseMaxWorkers(pThis->pqDA); } RETiRet; |