mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
InfluxDB: Flush only if there's data in the buffer
Regression from 2.10.4
This commit is contained in:
parent
09dfdaa71b
commit
cb3729bc6a
@ -421,10 +421,6 @@ void InfluxdbWriter::FlushTimeoutWQ()
|
|||||||
{
|
{
|
||||||
AssertOnWorkQueue();
|
AssertOnWorkQueue();
|
||||||
|
|
||||||
// Flush if there are any data available
|
|
||||||
if (m_DataBuffer.empty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Log(LogDebug, "InfluxdbWriter")
|
Log(LogDebug, "InfluxdbWriter")
|
||||||
<< "Timer expired writing " << m_DataBuffer.size() << " data points";
|
<< "Timer expired writing " << m_DataBuffer.size() << " data points";
|
||||||
|
|
||||||
@ -433,6 +429,10 @@ void InfluxdbWriter::FlushTimeoutWQ()
|
|||||||
|
|
||||||
void InfluxdbWriter::Flush()
|
void InfluxdbWriter::Flush()
|
||||||
{
|
{
|
||||||
|
/* Flush can be called from 1) Timeout 2) Threshold 3) on shutdown/reload. */
|
||||||
|
if (m_DataBuffer.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
Log(LogDebug, "InfluxdbWriter")
|
Log(LogDebug, "InfluxdbWriter")
|
||||||
<< "Flushing data buffer to InfluxDB.";
|
<< "Flushing data buffer to InfluxDB.";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user