diff --git a/lib/inc/RedisVidIndexGenerator.h b/lib/inc/RedisVidIndexGenerator.h index 61b3361a0..d0201fd61 100644 --- a/lib/inc/RedisVidIndexGenerator.h +++ b/lib/inc/RedisVidIndexGenerator.h @@ -32,7 +32,5 @@ namespace sairedis std::shared_ptr m_dbConnector; std::string m_vidCounterName; - - std::shared_ptr m_redisClient; }; } diff --git a/lib/src/RedisVidIndexGenerator.cpp b/lib/src/RedisVidIndexGenerator.cpp index a1a2cee07..ef68f26ce 100644 --- a/lib/src/RedisVidIndexGenerator.cpp +++ b/lib/src/RedisVidIndexGenerator.cpp @@ -11,8 +11,6 @@ RedisVidIndexGenerator::RedisVidIndexGenerator( m_vidCounterName(vidCounterName) { SWSS_LOG_ENTER(); - - m_redisClient = std::make_shared(m_dbConnector.get()); } uint64_t RedisVidIndexGenerator::increment() @@ -22,7 +20,7 @@ uint64_t RedisVidIndexGenerator::increment() // this counter must be atomic since it can be independently accessed by // sairedis and syncd - return m_redisClient->incr(m_vidCounterName); // "VIDCOUNTER" + return m_dbConnector->incr(m_vidCounterName); // "VIDCOUNTER" } void RedisVidIndexGenerator::reset() diff --git a/syncd/tests.cpp b/syncd/tests.cpp index d75c4ee85..b054b17af 100644 --- a/syncd/tests.cpp +++ b/syncd/tests.cpp @@ -60,7 +60,6 @@ sai_status_t sai_bulk_remove_fdb_entry( SWSS_LOG_THROW(format ": %s", ##__VA_ARGS__, sai_serialize_status(status).c_str()); using namespace saimeta; -static std::shared_ptr g_redisClient; static std::shared_ptr g_db1; static sai_next_hop_group_api_t test_next_hop_group_api; @@ -89,7 +88,6 @@ void clearDB() g_db1 = std::make_shared("ASIC_DB", 0, true); swss::RedisReply r(g_db1.get(), "FLUSHALL", REDIS_REPLY_STATUS); - g_redisClient = std::make_shared(g_db1.get()); r.checkStatusOK(); }