diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-04 14:32:49 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-04 14:32:49 +0100 |
commit | ce57131e1e713c1d2e998919dcd901a33faa6d97 (patch) | |
tree | feb0f2fb764d393a3f8fe9a5933fce2251f417ca /runtime/ruleset.c | |
parent | f558b07493cc756dedd3c84753965697d893467a (diff) | |
download | rsyslog-ce57131e1e713c1d2e998919dcd901a33faa6d97.tar.gz rsyslog-ce57131e1e713c1d2e998919dcd901a33faa6d97.tar.bz2 rsyslog-ce57131e1e713c1d2e998919dcd901a33faa6d97.zip |
experimentally split ruleset execution in exec and commit phase
Diffstat (limited to 'runtime/ruleset.c')
-rw-r--r-- | runtime/ruleset.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/runtime/ruleset.c b/runtime/ruleset.c index 2ad21170..654c6e55 100644 --- a/runtime/ruleset.c +++ b/runtime/ruleset.c @@ -588,8 +588,14 @@ scriptExec(struct cnfstmt *root, batch_t *pBatch, sbool *active, wti_t *pWti) } +static void +commitBatch(wti_t *pWti) +{ + actionCommitAll(pWti); +} + /* Process (consume) a batch of messages. Calls the actions configured. - * If the whole batch uses a singel ruleset, we can process the batch as + * If the whole batch uses a single ruleset, we can process the batch as * a whole. Otherwise, we need to process it slower, on a message-by-message * basis (what can be optimized to a per-ruleset basis) * rgerhards, 2005-10-13 @@ -602,6 +608,8 @@ processBatch(batch_t *pBatch, wti_t *pWti) assert(pBatch != NULL); DBGPRINTF("processBatch: batch of %d elements must be processed\n", pBatch->nElem); + + /* execution phase */ if(pBatch->bSingleRuleset) { pThis = batchGetRuleset(pBatch); if(pThis == NULL) @@ -612,7 +620,8 @@ processBatch(batch_t *pBatch, wti_t *pWti) CHKiRet(processBatchMultiRuleset(pBatch, pWti)); } - actionCommitAll(pWti); + /* commit phase */ + commitBatch(pWti); finalize_it: DBGPRINTF("ruleset.ProcessMsg() returns %d\n", iRet); RETiRet; |