mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 22:00:42 +01:00
queue subsystem: harden disk queue against being killed at shutdown
At least a consistent .qi file is written at the being of the shutdown processing.
This commit is contained in:
parent
148fdfd667
commit
f614284722
@ -2559,6 +2559,15 @@ DoSaveOnShutdown(qqueue_t *pThis)
|
||||
/* destructor for the queue object */
|
||||
BEGINobjDestruct(qqueue) /* be sure to specify the object type also in END and CODESTART macros! */
|
||||
CODESTARTobjDestruct(qqueue)
|
||||
DBGOPRINT((obj_t*) pThis, "shutdown: begin to destruct queue\n");
|
||||
if(pThis->qType == QUEUETYPE_DISK) {
|
||||
DBGOPRINT((obj_t*) pThis, "doing a safety persist right on shutdown\n");
|
||||
qqueuePersist(pThis, QUEUE_CHECKPOINT);
|
||||
}
|
||||
if(pThis->pqDA != NULL) {
|
||||
DBGOPRINT((obj_t*) pThis->pqDA, "doing a safety persist right on shutdown\n");
|
||||
qqueuePersist(pThis->pqDA, QUEUE_CHECKPOINT);
|
||||
}
|
||||
if(pThis->bQueueStarted) {
|
||||
/* shut down all workers
|
||||
* We do not need to shutdown workers when we are in enqueue-only mode or we are a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user