-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[202311][portsorch] Handle TRANSCEIVER_INFO table on warm boot (#3107)
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
- Loading branch information
1 parent
8fd34c1
commit 5eadb79
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "subscriberstatetable.h" | ||
|
||
namespace swss | ||
{ | ||
SubscriberStateTable::SubscriberStateTable(DBConnector *db, const std::string &tableName, int popBatchSize, int pri) : | ||
ConsumerTableBase(db, tableName, popBatchSize, pri), | ||
m_table(db, tableName) | ||
{ | ||
} | ||
|
||
void SubscriberStateTable::pops(std::deque<KeyOpFieldsValuesTuple> &vkco, const std::string& /*prefix*/) | ||
{ | ||
std::vector<std::string> keys; | ||
m_table.getKeys(keys); | ||
for (const auto &key: keys) | ||
{ | ||
KeyOpFieldsValuesTuple kco; | ||
|
||
kfvKey(kco) = key; | ||
kfvOp(kco) = SET_COMMAND; | ||
|
||
if (!m_table.get(key, kfvFieldsValues(kco))) | ||
{ | ||
continue; | ||
} | ||
m_table.del(key); | ||
vkco.push_back(kco); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters