Skip to content

Commit

Permalink
[MultiDB] use get API to obtain dbid instead of hardcode value (#618)
Browse files Browse the repository at this point in the history
* [MultiDB] use get API to obtain dbid instead of hardcode value
  • Loading branch information
dzhangalibaba authored Jun 1, 2020
1 parent bd132ec commit d6c40e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions syncd/FlexCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1448,13 +1448,13 @@ void FlexCounter::collectBufferPoolCounters(
}

void FlexCounter::runPlugins(
_In_ swss::DBConnector& db)
_In_ swss::DBConnector& counters_db)
{
SWSS_LOG_ENTER();

const std::vector<std::string> argv =
{
std::to_string(COUNTERS_DB), // TODO
std::to_string(counters_db.getDbId()),
COUNTERS_TABLE,
std::to_string(m_pollInterval * 1000)
};
Expand All @@ -1470,7 +1470,7 @@ void FlexCounter::runPlugins(

for (const auto& sha : m_portPlugins)
{
runRedisScript(db, sha, portList, argv);
runRedisScript(counters_db, sha, portList, argv);
}

std::vector<std::string> queueList;
Expand All @@ -1484,7 +1484,7 @@ void FlexCounter::runPlugins(

for (const auto& sha : m_queuePlugins)
{
runRedisScript(db, sha, queueList, argv);
runRedisScript(counters_db, sha, queueList, argv);
}

std::vector<std::string> priorityGroupList;
Expand All @@ -1498,7 +1498,7 @@ void FlexCounter::runPlugins(

for (const auto& sha : m_priorityGroupPlugins)
{
runRedisScript(db, sha, priorityGroupList, argv);
runRedisScript(counters_db, sha, priorityGroupList, argv);
}

std::vector<std::string> bufferPoolVids;
Expand All @@ -1512,7 +1512,7 @@ void FlexCounter::runPlugins(

for (const auto& sha : m_bufferPoolPlugins)
{
runRedisScript(db, sha, bufferPoolVids, argv);
runRedisScript(counters_db, sha, bufferPoolVids, argv);
}
}

Expand Down

0 comments on commit d6c40e5

Please sign in to comment.