Commit Graph

28 Commits

Author SHA1 Message Date
Julian Brost b9e6273ba0 Icinga DB: only log queries at debug level 2021-11-12 15:41:17 +01:00
Julian Brost cb09d6833f RedisConnection: remove now redundant setting of TLS verification parameters
This is now done in UnbufferedAsioTlsStream.
2021-08-13 17:24:24 +02:00
Julian Brost f4b2bbc7af
Merge pull request #8940 from Icinga/bugfix/redisconnection-reset-callback
RedisConnection: copy callback before calling it
2021-07-28 15:19:26 +02:00
Julian Brost 4c7199fd7d RedisConnection: copy callback before calling it
This allows the callback to call RedisConnection::SetConnectedCallback() to set
another callback for this connection. This sets m_ConnectedCallback and thereby
destroys the std::function while it's running resulting in undefined behavior.
By operating on a copy, m_ConnectedCallback can be set without affecting the
currently running callback.
2021-07-28 11:34:17 +02:00
Alexander A. Klimov 0919df5aa1 Introduce IcingaDB#connect_timeout 2021-07-27 21:59:09 +02:00
Alexander A. Klimov e1e8ec2ea2 RedisConnection: AUTH and SELECT
... or PING to trigger NOAUTH.
2021-07-27 12:05:27 +02:00
Alexander A. Klimov 37e53eaa68 Icinga DB: support TLS 2021-07-22 14:34:07 +02:00
Alexander A. Klimov da922ca157 RedisConnection: log info messages only once
refs #8883
2021-07-20 17:52:12 +02:00
Alexander A. Klimov 67c4ebedd3 Combine all Redis connections' logs 2021-07-16 18:50:41 +02:00
Alexander A. Klimov 82c3827b66 RedisConnection: log actual query performance 2021-07-16 18:50:41 +02:00
Alexander A. Klimov d1e15a220c Icinga DB: use one Redis connection per config object type 2021-06-08 17:52:04 +02:00
Alexander Aleksandrovič Klimov b1719883a3
Merge pull request #8604 from Icinga/bugfix/icingadb-initial-sync-delay
IcingaDB: start initial dump in callback instead of timer
2021-01-21 13:47:12 +01:00
Julian Brost 2d080f14eb IcingaDB: start initial dump in callback instead of timer
Previously, the initial config dump was started in a timer executed
every 15 seconds. During the first execution of the timer, the Redis
connection is typically not established yet. Therefore, this delayed the
initial sync by up to 15 seconds.

This commit instead triggers the sync from a callback that is executed
after the connection is successfully established.

The timer is removed completely. On first glance, it looks like it would
ensure that a lost connection is reestablished, but this is handled
internally by RedisConnection. After the config has been dumped once,
that timer wouldn't ever attempt a reconnect anyways.
2021-01-20 09:31:27 +01:00
Julian Brost 174f7f75a8 IcingaDB: wait for queries to be executed in inital sync
This delays the log message stating that the initial dump is done until
all queries are actually done and now logs a meaningful duration. In
addition, this delays the return of the function and therefore when
state variables are updated by the caller.
2021-01-19 17:14:42 +01:00
Michael Friedrich 8f5375d2bb Use IoEngine::Spawn wrapper in RedisConnection class
This avoids multiple locations for `asio::spawn` calls.
2020-01-16 09:53:24 +01:00
Alexander A. Klimov f6f7d9b635 IcingaDB: suppress state sync until config sync finished 2019-12-18 13:41:56 +01:00
Michael Friedrich 387c2c8b79
Merge pull request #7717 from Icinga/bugfix/redisconnection-shared_ptr
RedisConnection: replace std::shared_ptr<T> with Shared<T>::Ptr
2019-12-18 13:32:16 +01:00
Michael Friedrich cbbff6b37d
Merge pull request #7716 from Icinga/bugfix/redisconnection-long-logs
RedisConnection: shorten log messages
2019-12-18 13:31:51 +01:00
Alexander A. Klimov de5b3eb2c7 RedisConnection: replace std::shared_ptr<T> with Shared<T>::Ptr 2019-12-17 12:13:30 +01:00
Alexander A. Klimov 955b612703 RedisConnection: shorten log messages 2019-12-17 11:49:54 +01:00
Alexander A. Klimov b1cc0cd767 Document RedisConnection 2019-12-17 11:44:00 +01:00
Alexander A. Klimov e391c0e7b5 RedisConnection: introduce extensible priorities 2019-12-02 17:21:00 +01:00
Alexander A. Klimov e522db20b1 RedisConnection#Connect(): don't give up 2019-11-26 14:16:39 +01:00
Michael Friedrich 9d9804d50a Styleguide for IcingaDB 2019-11-02 18:01:31 +01:00
Michael Friedrich 36d18ed23a IcingaDB: Log where we are connecting to 2019-11-02 15:47:46 +01:00
Michael Friedrich 61d9130dd0 Fix Copyright headers 2019-11-02 14:00:24 +01:00
Alexander A. Klimov 67909210a6 RedisConnection: introduce high-priority queue
refs #57
2019-11-02 14:00:24 +01:00
Alexander Aleksandrovič Klimov 13ab7eb609 Rename redis to icingadb 2019-11-02 14:00:24 +01:00