mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 21:00:41 +01:00
The previous approach was more or less delay based. We have now changed the code to enable imdiag to detect if HUP is underway and wait until it is completed. The new method still employs some kind of timeout, but is now quite reliable. Most importantly, it works great with long-running HUP processing, which can happen e.g. when querying the system name takes long or some actions need longer time to persist their HUP processing. The new approach will most likely reduce CI flakes and also speed up testbench runs. The speedup happens from not having to wait a full delay in cases where we detect HUP is completed (plus reduced timeout when we cannot clearly detect this - see code comments why the new method is still considered more reliable than the old one). Code note: we needed to slightly re-structure the way actual HUP processing and the "HUP mutex" is handled. After best analysis, this does not affect the reliability or speed in production settings. closes https://github.com/rsyslog/rsyslog/issues/5192
50 lines
2.2 KiB
C
50 lines
2.2 KiB
C
/* This file is an aid to support non-modular object accesses
|
|
* while we do not have fully modularized everything. Once this is
|
|
* done, this file can (and should) be deleted. Presence of it
|
|
* also somewhat indicates that the runtime library is not really
|
|
* yet a runtime library, because it depends on some functionality
|
|
* residing somewhere else.
|
|
*
|
|
* Copyright 2007-2023 Rainer Gerhards and Adiscon GmbH.
|
|
*
|
|
* This file is part of rsyslog.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
* -or-
|
|
* see COPYING.ASL20 in the source distribution
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
#ifndef DIRTY_H_INCLUDED
|
|
#define DIRTY_H_INCLUDED 1
|
|
|
|
rsRetVal __attribute__((deprecated)) multiSubmitMsg(multi_submit_t *pMultiSub);
|
|
rsRetVal ATTR_NONNULL() multiSubmitMsg2(multi_submit_t *const pMultiSub); /* friends only! */
|
|
rsRetVal submitMsg2(smsg_t *pMsg);
|
|
rsRetVal __attribute__((deprecated)) submitMsg(smsg_t *pMsg);
|
|
rsRetVal multiSubmitFlush(multi_submit_t *pMultiSub);
|
|
rsRetVal logmsgInternal(const int iErr, const syslog_pri_t pri, const uchar *const msg, int flags);
|
|
rsRetVal __attribute__((deprecated)) parseAndSubmitMessage(const uchar *hname,
|
|
const uchar *hnameIP, const uchar *msg, const int len,
|
|
const int flags, const flowControl_t flowCtlType,
|
|
prop_t *pInputName, const struct syslogTime *stTime,
|
|
const time_t ttGenTime, ruleset_t *pRuleset);
|
|
rsRetVal createMainQueue(qqueue_t **ppQueue, uchar *pszQueueName, struct nvlst *lst);
|
|
rsRetVal startMainQueue(rsconf_t *cnf, qqueue_t *pQueue);
|
|
int get_bHadHUP(void);
|
|
|
|
extern int MarkInterval;
|
|
#define CONF_VERIFY_PARTIAL_CONF 0x02 /* bit: partial configuration to be checked */
|
|
extern int iConfigVerify; /* is this just a config verify run? */
|
|
extern int bHaveMainQueue;
|
|
|
|
#endif /* #ifndef DIRTY_H_INCLUDED */
|