summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
Commit message (Collapse)AuthorAgeFilesLines
* some light performance enhancementRainer Gerhards2009-11-121-1/+4
| | | | | ...by replacing time() call with much faster (at least under linux) gettimeofday() calls.
* moved rfc3164/5424 code to new parser modulesRainer Gerhards2009-11-041-6/+3
| | | | | | another milestone commit: the program works, the new interface is used, some more cleanup is needed and the per-ruleset config options are still missing. But we are getting closer...
* one step closer to dynamically loadable parsersRainer Gerhards2009-11-031-1/+0
| | | | | This is a milestone commit, which adds new code that breaks nothing, but also does not add any visible change. Just prep work...
* removed no longer needed flag variableRainer Gerhards2009-10-271-10/+6
|
* fix compile bug with last commitRainer Gerhards2009-10-271-1/+0
|
* some cleanupRainer Gerhards2009-10-271-72/+0
|
* fixed race condition during queue shutdownRainer Gerhards2009-10-271-8/+10
| | | | | | | | Problems could happen if the queue worker needed to be cancelled and this cancellation happened inside queue-code (including wtp, wti). We have now solved this by disabling cancellation while in this code and only enabling it when working inside the user consumer. This exactly matches the use case for which cancellation may be needed.
* shuffled cancelability state to different spotRainer Gerhards2009-10-261-3/+8
| | | | ... but in anticipation of changing cancel processing altogether...
* addressed some race issues during queue shutdownRainer Gerhards2009-10-261-14/+20
| | | | | | | these occured in very unusual scenarios where we had a DA-queue running in parallel and very lengthy actions. Then, in some situations, the shutdown could hang. The code needs some addition lab time, but is believed to be much better than any previous version.
* Merge branch 'master' into queuePartialDeleteBatchesRainer Gerhards2009-10-261-1/+5
|\
| * bugfix: potential abort if inputname property was not setRainer Gerhards2009-10-261-1/+5
| | | | | | | | | | | | primarily a problem of imdiag. Also added some fix for a potential situation during cancel processing. That one is not considered vital and may later be removed again.
* | implemented solution for cancel at shutdown/unprocessed entriesRainer Gerhards2009-10-261-35/+23
| | | | | | | | | | We do now enqueue those objects that are left unprocessed. This enables us to delete the full batch, what is exactly what we need to do.
* | Begun to work on partial batch deletes...Rainer Gerhards2009-10-221-9/+21
|/ | | | | | | | ... but this brings a lot of problems with it. The issue is that we still have a sequential store and we do not know how we could delete the one entry right in the middle of processing. I keep this branch if we intend to move on with it - but for now I look into a different solution...
* enhanced test environment (including testbench)Rainer Gerhards2009-10-221-5/+5
| | | | | | | | support for enhancing probability of memory addressing failure by using non-NULL default value for malloced memory (optional, only if requested by configure option). This helps to track down some otherwise undetected issues within the testbench and is expected to be very useful in the future.
* Merge branch 'newqueue'Rainer Gerhards2009-10-211-397/+108
|\ | | | | | | | | | | Conflicts: ChangeLog runtime/queue.c
| * bugfix: message processing states were not set correctly in all casesRainer Gerhards2009-10-191-13/+4
| | | | | | | | | | | | however, this had no negative effect, as the message processing state was not evaluated when a batch was deleted, and that was the only case where the state could be wrong.
| * new queue engine - initial commit (probably not 100% working!)Rainer Gerhards2009-10-141-408/+101
| | | | | | | | | | | | | | | | | | | | simplified and thus speeded up the queue engine, also fixed some potential race conditions (in very unusual shutdown conditions) along the way. The threading model has seriously changes, so there may be some regressions. NOTE: the code passed basic tests, but there is still more work and testing to be done. This commit should be treated with care.
| * added some debug settings plus improved shutdown sequenceRainer Gerhards2009-10-131-12/+39
| | | | | | | | ... non-working version!
* | bugfix: segfault when starting up with an invalid .qi file for a disk queueRainer Gerhards2009-10-201-5/+16
|/ | | | | Failed for both pure disk as well as DA queues. Now, we emit an error message and disable disk queueing facility.
* bugfix and testbench improvementsRainer Gerhards2009-10-071-4/+18
| | | | | | | | - 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
* bugfix and testbench improvementRainer Gerhards2009-10-071-2/+20
| | | | | | | | | | | made shutdown more reliable by makeing sure that the main queue DA worker is only cancelled if this is actually unavoidable. Also moved down the deletion of rsyslogd's pid file to immediately before termination, so that absence of the file is a proper indication that rsyslogd has finished (in the past, e.g. the testbench accidently ran two intances as the pid file was deleted too early). Also some improvments to the testbench, namely to handle aborts more intelligently (but still not perfect).
* reduced number of debug messages a bit againRainer Gerhards2009-08-261-2/+0
|
* bugfix: discard action did not work (did not discard messages)Rainer Gerhards2009-07-301-0/+2
|
* cleanup & better debug message handlingRainer Gerhards2009-07-201-66/+65
| | | | | | the new handling will hopefully spare a few cycles, as function calls (and most importantly parameter generation!) or now only done when debug messages are actually active.
* corrected some conditions & one more simplificationRainer Gerhards2009-07-201-15/+3
|
* simplified startup of queue DA modeRainer Gerhards2009-07-201-64/+9
|
* solved potential race condition and some cleanupRainer Gerhards2009-07-201-6/+11
| | | | | | | code review brought up some few places where we may have run into a race. They have most probably been introduced during the recent set of changes. But I do not look at older versions because of the changed architecture, one can not simply backport this patch.
* bugfix: minor static memory leak while reading configurationRainer Gerhards2009-07-201-1/+0
| | | | | This did NOT leak based on message volume. Also, did some cleanup during the commit.
* architecture change: queue now always has at least one worker threadRainer Gerhards2009-07-201-17/+0
| | | | | | ...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.
* more cleanup/simplification (forgot to remove one mutex lock)Rainer Gerhards2009-07-201-11/+9
|
* some more threading changesRainer Gerhards2009-07-201-25/+21
| | | | ... as well as some cleanup
* further code simplificationRainer Gerhards2009-07-171-2/+1
| | | | | | | | | ... could even remove one mutex by using a better algorithm. I think I also spotted some situation in which a hang could have happened. As I can't fix it in v4 and less without moving to the new engine, I make no effort in testing this out. Hangs occur during shutdown, only (if at all). The code changes should also result in some mild performance improvement. Some bug potential, but overall the bug potential should have been greatly reduced.
* more code simplification, should also bring some performance enhancementRainer Gerhards2009-07-171-20/+18
| | | | reducing the number of thread cancellation state changes
* finishing touches for 5.1.2v5.1.2Rainer Gerhards2009-07-081-1/+1
|
* Merge branch 'v4-devel'Rainer Gerhards2009-07-081-99/+34
|\ | | | | | | | | | | Conflicts: runtime/debug.h runtime/stream.c
* | Merge branch 'v4-beta'Rainer Gerhards2009-07-071-2/+2
|\|
| * performance enhancement: much faster, up to twice as fastRainer Gerhards2009-07-061-2/+2
| | | | | | | | | | | | (depending on configuration). This was a small change, but with big results. There is more potential to explore, but the effects were so dramatic that I think it makes sense to include this fix.
| * bugfix: subtle potential issue during queue shutdownRainer Gerhards2009-06-251-1/+1
| | | | | | | | | | ... this one could cause trouble, but I really don't think it caused any actual harm.
* | bugfix: subtle synchronization issueRainer Gerhards2009-06-251-9/+4
| | | | | | | | | | | | This may have caused a segfault under strange circumstances (but if we just run long enough with a high enough message volume, even the strangest circumstances will occur...)
* | added a few atomic operationsRainer Gerhards2009-06-251-9/+8
| | | | | | | | | | mostly to get thread debugger errors clean (plus, of course, it makes things more deterministic)
* | adapted (and improved) input batching to v5 engineRainer Gerhards2009-06-221-1/+2
| |
* | bugfix: huge memory leak in queue engineRainer Gerhards2009-06-221-0/+1
| | | | | | | | | | (made rsyslogd unusable in production). Occured if at least one queue was in direct mode (the default for action queues).
* | Merge branch 'omfile' into tmpRainer Gerhards2009-06-221-3/+121
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a complex manual merge, especially in action.c. So if there occur some problems, this would be a good point to start troubleshooting. I run a couple of tests before commiting and they all went well. Conflicts: action.c action.h runtime/queue.c runtime/queue.h runtime/wti.c runtime/wti.h
| * removed uniprocessor optimizationRainer Gerhards2009-06-191-15/+0
| | | | | | | | | | | | ... as it was not even optimal on uniprocessors any longer ;) I keep the config directive in, maybe we can utilize it again at some later point in time (questionable).
| * some cleanupRainer Gerhards2009-06-161-6/+4
| |
| * implemented first version of multi-enqueue support, queue sideRainer Gerhards2009-06-161-0/+126
| |
* | Merge branch 'omfile' into v5-develRainer Gerhards2009-06-161-62/+68
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that this was NOT a trivial merge, and there may be some issues. This needs to be seen when we continue developing. Conflicts: runtime/msg.h runtime/obj.h runtime/queue.c runtime/srUtils.h runtime/stream.c runtime/stream.h runtime/wti.c tests/Makefile.am tools/omfile.c tools/syslogd.c
| * added capability to fsync() queue disk files for enhanced reliabilityRainer Gerhards2009-06-091-0/+5
| | | | | | | | | | | | | | also adds speed, because you do no longer need to run the whole file system in sync mode. New testbench and new config directives: - $MainMsgQueueSyncQueueFiles - $ActionQueueSyncQueueFiles
| * modified stream class and omfile to work with itRainer Gerhards2009-06-041-2/+1
| | | | | | | | now some basic operations are carried out via the stream class.
| * cleaned up stream class ...Rainer Gerhards2009-06-041-44/+46
| | | | | | | | | | | | ... and also made it callable via an rsyslog interface rather then relying on the OS loader (important if we go for using it inside loadbale modules, which we soon possible will)