]> granicus.if.org Git - icinga2/commit
Fix TLS Race Connecting to InfluxDB 5504/head
authorSimon Murray <spjmurray@yahoo.co.uk>
Mon, 14 Aug 2017 15:20:45 +0000 (16:20 +0100)
committerSimon Murray <spjmurray@yahoo.co.uk>
Mon, 14 Aug 2017 15:20:49 +0000 (16:20 +0100)
commitabc3652b003a3e14a7eae3e0f81c1a28d2b6106c
treea048094e44626ec423a0f9ba93165093458fe256
parenta8c44cba351a737ea0f3e3a3534af65bd6089e4f
Fix TLS Race Connecting to InfluxDB

Rather than leaving stale connections about we tried to poll for data coming in
from InfluxDB and timeout if it didn't repond in a timely manner.  This introduced
a race where the timeout triggers, a context switch occurs where data is actually
available and the TlsStream spins trying to asynchronously notify that data is
available, but which never gets read.  Not only does this use up 100% of a core,
but it also slowly starves the system of handler threads at which point metrics
stop being delivered.

This basically removes the poll and timeout, any TLS socket erros should be
detected by TCP keep-alives.

Fixes #5460 #5469
doc/09-object-types.md
lib/perfdata/influxdbwriter.cpp
lib/perfdata/influxdbwriter.hpp
lib/perfdata/influxdbwriter.ti