mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +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();
|
||||
|
||||
// Flush if there are any data available
|
||||
if (m_DataBuffer.empty())
|
||||
return;
|
||||
|
||||
Log(LogDebug, "InfluxdbWriter")
|
||||
<< "Timer expired writing " << m_DataBuffer.size() << " data points";
|
||||
|
||||
@ -433,6 +429,10 @@ void InfluxdbWriter::FlushTimeoutWQ()
|
||||
|
||||
void InfluxdbWriter::Flush()
|
||||
{
|
||||
/* Flush can be called from 1) Timeout 2) Threshold 3) on shutdown/reload. */
|
||||
if (m_DataBuffer.empty())
|
||||
return;
|
||||
|
||||
Log(LogDebug, "InfluxdbWriter")
|
||||
<< "Flushing data buffer to InfluxDB.";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user