Add Redis Sentinel based database discovery
This is first step to support forthcoming Redis HA (Sentinel) DBaaS
deployment.
If sentinel-based database discovery is used (currently still disabled
by configure option), current master is asked from Sentinel.
In case that Sentinel can't be connected, re-try will be triggered
after one second delay. If reply parsing fails, it is considered as
non-recoverable bug and execution is aborted.
Currently, Sentinel address and Redis master name are still hard coded,
will be made configurable in a separate commit soon. Also ordering
change notifications from Sentinel will be implemented separately.
Added new discovery type "SENTINEL" to 'sdltool test-connectivity'
command output.
Refactoring for 'AsyncStorageImpl' class unit tests, so that those will
use database discovery mock implementation. Earlier implementation did
have assumptions for database discovery behavior, which were not
fulfilled any more when sentinel database discovery is used.
Added option to 'AsyncCommandDispatcher' which defines if commands
will be sent to Redis or to Sentinel. In latter case existence checking
for Redis module extension commands is skipped.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Id7507844c9b74115e52d6f8eaf9cb18198c5dc63
diff --git a/src/redis/asyncredisstorage.cpp b/src/redis/asyncredisstorage.cpp
index 22d4b2b..f6bf63d 100644
--- a/src/redis/asyncredisstorage.cpp
+++ b/src/redis/asyncredisstorage.cpp
@@ -53,7 +53,8 @@
databaseInfo,
contentsBuilder,
false,
- logger);
+ logger,
+ false);
}
class AsyncRedisStorageErrorCategory: public std::error_category