Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/RedisChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RedisChannel::RedisChannel(
m_getConsumer = std::make_shared<swss::ConsumerTable>(m_db.get(), REDIS_TABLE_GETRESPONSE);

m_dbNtf = std::make_shared<swss::DBConnector>(dbAsic, 0);
m_notificationConsumer = std::make_shared<swss::NotificationConsumer>(m_dbNtf.get(), REDIS_TABLE_NOTIFICATIONS);
m_notificationConsumer = std::make_shared<swss::NotificationConsumer>(m_dbNtf.get(), REDIS_TABLE_NOTIFICATIONS_PER_DB(dbAsic));

m_runNotificationThread = true;

Expand Down
12 changes: 12 additions & 0 deletions lib/sairediscommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@
*/
#define REDIS_TABLE_NOTIFICATIONS "NOTIFICATIONS"

/**
* @brief Table which will be used to forward notifications per DB scope
*
* In https://redis.io/docs/manual/pubsub/, it says:
* "Pub/Sub has no relation to the key space. It was made to not interfere with
* it on any level, including database numbers."
*/
#define REDIS_TABLE_NOTIFICATIONS_PER_DB(dbName) \
((dbName) == "ASIC_DB" ? \
REDIS_TABLE_NOTIFICATIONS : \
(dbName) + "_" + REDIS_TABLE_NOTIFICATIONS)

/**
* @brief Table which will be used to send API response from syncd.
*/
Expand Down
2 changes: 1 addition & 1 deletion syncd/RedisNotificationProducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RedisNotificationProducer::RedisNotificationProducer(

m_db = std::make_shared<swss::DBConnector>(dbName, 0);

m_notificationProducer = std::make_shared<swss::NotificationProducer>(m_db.get(), REDIS_TABLE_NOTIFICATIONS);
m_notificationProducer = std::make_shared<swss::NotificationProducer>(m_db.get(), REDIS_TABLE_NOTIFICATIONS_PER_DB(dbName));
}

void RedisNotificationProducer::send(
Expand Down
2 changes: 2 additions & 0 deletions tests/aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ inseg
Inseg
INSEG
insegs
io
ip
IP
ipc
Expand Down Expand Up @@ -308,6 +309,7 @@ PORTs
pre
printf
ptr
pubsub
qos
queueCounterIds
queueId
Expand Down