File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ void RequestShutdown::send()
37
37
38
38
swss::DBConnector db (m_contextConfig->m_dbAsic , 0 );
39
39
40
- swss::NotificationProducer restartQuery (&db, SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY );
40
+ swss::NotificationProducer restartQuery (&db, SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY_PER_DB (m_contextConfig-> m_dbAsic ) );
41
41
42
42
std::vector<swss::FieldValueTuple> values;
43
43
Original file line number Diff line number Diff line change 9
9
10
10
#define SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY " RESTARTQUERY"
11
11
12
+ /* *
13
+ * @brief Notification channel 'restartQuery' per DB scope
14
+ *
15
+ * In https://redis.io/docs/manual/pubsub/, it says:
16
+ * "Pub/Sub has no relation to the key space. It was made to not interfere with
17
+ * it on any level, including database numbers."
18
+ */
19
+ #define SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY_PER_DB (dbName ) \
20
+ ((dbName) == " ASIC_DB" ? \
21
+ SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY : \
22
+ (dbName) + " _" + SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY)
23
+
12
24
namespace syncd
13
25
{
14
26
class RequestShutdown
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ Syncd::Syncd(
161
161
162
162
m_handler->setSwitchNotifications (m_sn.getSwitchNotifications ());
163
163
164
- m_restartQuery = std::make_shared<swss::NotificationConsumer>(m_dbAsic.get (), SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY );
164
+ m_restartQuery = std::make_shared<swss::NotificationConsumer>(m_dbAsic.get (), SYNCD_NOTIFICATION_CHANNEL_RESTARTQUERY_PER_DB (m_contextConfig-> m_dbAsic ) );
165
165
166
166
// TODO to be moved to ASIC_DB
167
167
m_dbFlexCounter = std::make_shared<swss::DBConnector>(m_contextConfig->m_dbFlex , 0 );
You can’t perform that action at this time.
0 commit comments