summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-10 10:17:04 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-10 10:17:04 +0200
commit559cb84a79a9848ce1415569158928478991108c (patch)
tree65534ac2ef41595a1bdd04bbf9f692feea5408c5 /action.c
parent3e49a1075ab6750135e1a38cf0c213579fa30b4a (diff)
downloadrsyslog-559cb84a79a9848ce1415569158928478991108c.tar.gz
rsyslog-559cb84a79a9848ce1415569158928478991108c.tar.xz
rsyslog-559cb84a79a9848ce1415569158928478991108c.zip
fixing msg duplication & loss regression, causes slowdown
messages could get lost or be duplicated due to non-proper sync of transactions. This is a notable slowdown again, but we know how to get back concurrency, it just takes "some" more programming. It is important now to come back to correct code, so that we can base further improvements on that.
Diffstat (limited to 'action.c')
-rw-r--r--action.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/action.c b/action.c
index b055ebf4..0e42b880 100644
--- a/action.c
+++ b/action.c
@@ -765,10 +765,10 @@ actionCallDoAction(action_t *pThis, msg_t *pMsg)
pThis->bHadAutoCommit = 0;
#if 1
-d_pthread_mutex_lock(&pThis->mutActExec);
-pthread_cleanup_push(mutexCancelCleanup, &pThis->mutActExec);
+//d_pthread_mutex_lock(&pThis->mutActExec);
+//pthread_cleanup_push(mutexCancelCleanup, &pThis->mutActExec);
iRet = pThis->pMod->mod.om.doAction(ppMsgs, pMsg->msgFlags, pThis->pModData);
-pthread_cleanup_pop(1); /* unlock mutex */
+//pthread_cleanup_pop(1); /* unlock mutex */
//iRet = pThis->pMod->mod.om.doAction(pThis->ppMsgs, pMsg->msgFlags, pThis->pModData);
#else
iRet = RS_RET_OK;
@@ -1051,12 +1051,12 @@ processBatchMain(action_t *pAction, batch_t *pBatch, int *pbShutdownImmediate)
* if they notify us they are - functionality not yet implemented...).
* rgerhards, 2008-01-30
*/
-// d_pthread_mutex_lock(&pAction->mutActExec);
-// pthread_cleanup_push(mutexCancelCleanup, &pAction->mutActExec);
+ d_pthread_mutex_lock(&pAction->mutActExec);
+ pthread_cleanup_push(mutexCancelCleanup, &pAction->mutActExec);
iRet = processAction(pAction, pBatch, pbShutdownImmediate);
-// pthread_cleanup_pop(1); /* unlock mutex */
+ pthread_cleanup_pop(1); /* unlock mutex */
RETiRet;
}