Add definable timeout for SyncStorage APIs 84/6584/3
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Thu, 5 Aug 2021 08:46:07 +0000 (11:46 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 11 Aug 2021 04:20:48 +0000 (07:20 +0300)
commitfaf9fc79e58fa4ace9b0ef317b741afb2c1a8abe
tree99ebcc9be10750d9deaf9ec9cf81ac8d26c65479
parent6e77ef4f748bdfa40505fc11c0a190e7a40fdb46
Add definable timeout for SyncStorage APIs

Add a new synchronous API function 'SyncStorage::setOperationTimeout()',
which can be used to set given timeout value for synchronous SDL
instance. If SDL database backend (Redis) is not available, hanging SDL
write, read or delete operation is terminated and an exception is raised
after timeout time has been elapsed. By default if timeout value hasn't
been set, hanging SDL synchronous operation is blocked indefinitely if
Redis is not available.

Following additional improvements:
 - Improved AsyncConnectionImpl UT coverage
 - Fixed member variable order in Hiredis*EpollAdapter-classes.
   Hiredis*System must be first member variable because its functions
   are called via engine event handler. Thus it must be before engine.
 - Redis disconnected debug log is now written also in success status
   (SDL initiated) disconnection.

Issue-ID: RIC-226

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I46e5e9738c25edb1c0d068dff739e765ca11096a
17 files changed:
Makefile.am
README.md
configure.ac
debian/changelog.in
docs/release-notes.rst
include/private/redis/hiredisclusterepolladapter.hpp
include/private/redis/hiredisepolladapter.hpp
include/private/syncstorageimpl.hpp
include/private/tst/syncstorageimplmock.hpp [new file with mode: 0644]
include/sdl/syncstorage.hpp
include/sdl/tst/mockablesyncstorage.hpp
rpm/sdl.spec.in
src/redis/asynchiredisclustercommanddispatcher.cpp
src/redis/hiredisclusterepolladapter.cpp
src/redis/hiredisepolladapter.cpp
src/syncstorageimpl.cpp
tst/syncstorageimpl_test.cpp