Skip to content

Commit f50dba7

Browse files
authored
[syncd] Fix access coldvid table per switch (sonic-net#866)
Signed-off-by: kcudnik <[email protected]>
1 parent 0d5f82f commit f50dba7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

syncd/RedisClient.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010

1111
using namespace syncd;
1212

13+
// vid and rid maps contains objects from all switches
1314
#define VIDTORID "VIDTORID"
1415
#define RIDTOVID "RIDTOVID"
16+
17+
// those here are per switch
1518
#define LANES "LANES"
1619
#define HIDDEN "HIDDEN"
1720
#define COLDVIDS "COLDVIDS"
@@ -664,7 +667,9 @@ void RedisClient::removeColdVid(
664667

665668
auto strVid = sai_serialize_object_id(vid);
666669

667-
m_dbAsic->hdel(COLDVIDS, strVid);
670+
auto key = getRedisColdVidsKey(vid);
671+
672+
m_dbAsic->hdel(key, strVid);
668673
}
669674

670675
std::unordered_map<std::string, std::string> RedisClient::getAttributesFromAsicKey(

0 commit comments

Comments
 (0)