From 506cce428a428fbc3fc69cbbe6b66940cbde3634 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Tue, 3 Nov 2020 18:37:58 +0000 Subject: [PATCH] Revert "Deprecate RedisClient and remove unused header file (#399)" This reverts commit 3ec30ef36aef70052fbe06af427174041cda4c81. --- common/dbinterface.h | 1 + common/logger.cpp | 1 + common/loglevel.cpp | 1 + common/redisclient.h | 6 ++++-- tests/fdb_flush.cpp | 1 + tests/logger_ut.cpp | 1 + tests/redis_state_ut.cpp | 1 + tests/redis_ut.cpp | 1 + 8 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/dbinterface.h b/common/dbinterface.h index 80b7037bf..12a249578 100644 --- a/common/dbinterface.h +++ b/common/dbinterface.h @@ -5,6 +5,7 @@ #include #include "dbconnector.h" +#include "redisclient.h" #include "logger.h" namespace swss diff --git a/common/logger.cpp b/common/logger.cpp index ce0ee3d7d..53112a399 100644 --- a/common/logger.cpp +++ b/common/logger.cpp @@ -11,6 +11,7 @@ #include "schema.h" #include "select.h" #include "dbconnector.h" +#include "redisclient.h" #include "consumerstatetable.h" #include "producerstatetable.h" diff --git a/common/loglevel.cpp b/common/loglevel.cpp index 1be85c099..6ae85af63 100644 --- a/common/loglevel.cpp +++ b/common/loglevel.cpp @@ -7,6 +7,7 @@ #include "schema.h" #include "logger.h" #include "dbconnector.h" +#include "redisclient.h" #include "producerstatetable.h" using namespace swss; diff --git a/common/redisclient.h b/common/redisclient.h index 59282a310..5494f24cc 100644 --- a/common/redisclient.h +++ b/common/redisclient.h @@ -60,8 +60,10 @@ class RedisClient private: swss::DBConnector *m_db; -} __attribute__ ((__deprecated__)); -// This class is deprecated. Please use DBConnector class instead. +}; + +// TODO: mark above class: __attribute__ ((__deprecated__)); +// After remove all the caller code } diff --git a/tests/fdb_flush.cpp b/tests/fdb_flush.cpp index 7ba981c0d..cab2225ab 100644 --- a/tests/fdb_flush.cpp +++ b/tests/fdb_flush.cpp @@ -4,6 +4,7 @@ #include "common/producertable.h" #include "common/consumertable.h" #include "common/redisapi.h" +#include "common/redisclient.h" #include #include diff --git a/tests/logger_ut.cpp b/tests/logger_ut.cpp index c17c9c262..65203e4e1 100644 --- a/tests/logger_ut.cpp +++ b/tests/logger_ut.cpp @@ -1,4 +1,5 @@ #include "common/dbconnector.h" +#include "common/redisclient.h" #include "common/producerstatetable.h" #include "common/consumerstatetable.h" #include "common/select.h" diff --git a/tests/redis_state_ut.cpp b/tests/redis_state_ut.cpp index d14d8f915..5ec353870 100644 --- a/tests/redis_state_ut.cpp +++ b/tests/redis_state_ut.cpp @@ -11,6 +11,7 @@ #include "common/table.h" #include "common/producerstatetable.h" #include "common/consumerstatetable.h" +#include "common/redisclient.h" using namespace std; using namespace swss; diff --git a/tests/redis_ut.cpp b/tests/redis_ut.cpp index 03a7e1e6e..9d8becf00 100644 --- a/tests/redis_ut.cpp +++ b/tests/redis_ut.cpp @@ -12,6 +12,7 @@ #include "common/selectableevent.h" #include "common/selectabletimer.h" #include "common/table.h" +#include "common/redisclient.h" #include "common/dbinterface.h" #include "common/sonicv2connector.h"