Skip to content

Commit a2e58cf

Browse files
authored
Add lock for redis client norifications (sonic-net#218)
1 parent 0af9187 commit a2e58cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

syncd/syncd_notifications.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ void redisPutFdbEntryToAsicView(
9898
const std::string &strField = fvField(e);
9999
const std::string &strValue = fvValue(e);
100100

101+
std::lock_guard<std::mutex> lock(g_db_mutex);
102+
101103
g_redisClient->hset(key, strField, strValue);
102104
}
103105

0 commit comments

Comments
 (0)