summaryrefslogtreecommitdiffstats
path: root/runtime/queue.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-09 19:00:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-09 19:00:18 +0200
commit9704f129f72ec9ece11aeccea4bbf0cbccb116cb (patch)
tree96f7b742a3040fd73569bf561e466f12b9086449 /runtime/queue.h
parent8d1e2e496c6a4a4d40d1e8604c746e0d32013536 (diff)
downloadrsyslog-9704f129f72ec9ece11aeccea4bbf0cbccb116cb.tar.gz
rsyslog-9704f129f72ec9ece11aeccea4bbf0cbccb116cb.tar.xz
rsyslog-9704f129f72ec9ece11aeccea4bbf0cbccb116cb.zip
added capability to fsync() queue disk files for enhanced reliability
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
Diffstat (limited to 'runtime/queue.h')
-rw-r--r--runtime/queue.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/queue.h b/runtime/queue.h
index a267862d..07f134aa 100644
--- a/runtime/queue.h
+++ b/runtime/queue.h
@@ -73,6 +73,7 @@ typedef struct queue_s {
void *pUsr; /* a global, user-supplied pointer. Is passed back to consumer. */
int iUpdsSincePersist;/* nbr of queue updates since the last persist call */
int iPersistUpdCnt; /* persits queue info after this nbr of updates - 0 -> persist only on shutdown */
+ int bSyncQueueFiles;/* if working with files, sync them after each write? */
int iHighWtrMrk; /* high water mark for disk-assisted memory queues */
int iLowWtrMrk; /* low water mark for disk-assisted memory queues */
int iDiscardMrk; /* if the queue is above this mark, low-severity messages are discarded */
@@ -186,6 +187,7 @@ rsRetVal qqueueConstruct(qqueue_t **ppThis, queueType_t qType, int iWorkerThread
int iMaxQueueSize, rsRetVal (*pConsumer)(void*,void*));
PROTOTYPEObjClassInit(qqueue);
PROTOTYPEpropSetMeth(qqueue, iPersistUpdCnt, int);
+PROTOTYPEpropSetMeth(qqueue, bSyncQueueFiles, int);
PROTOTYPEpropSetMeth(qqueue, iDeqtWinFromHr, int);
PROTOTYPEpropSetMeth(qqueue, iDeqtWinToHr, int);
PROTOTYPEpropSetMeth(qqueue, toQShutdown, long);