[TableBase] Make channel name from both table name and database ID#568
[TableBase] Make channel name from both table name and database ID#568jimmyzhai merged 8 commits intosonic-net:masterfrom
Conversation
* remove the deprecated tableNameSeparatorMap, always get separator from SonicDBConfig
| class TableBase { | ||
| public: | ||
| #ifndef SWIG | ||
| __attribute__((deprecated)) |
There was a problem hiding this comment.
Looks dbId is widely used to identify a database, and both Id and Name are primary properties of database. In database domain hierarchy, table always belongs to one database. To add dbId member in class TableBase is meaningful to indicate in which database the table is. In ctor internal, table separator is initialized to the separator of database dbId.
common/table.h
Outdated
| } | ||
|
|
||
| std::string getChannelName() { return m_tableName + "_CHANNEL"; } | ||
| std::string getChannelName() { return m_tableName + "_CHANNEL" |
There was a problem hiding this comment.
As above reply, I thinking adding dbId as a member is much reasonable.
| @@ -1,7 +1,7 @@ | |||
| #include "notificationproducer.h" | |||
|
|
|||
| swss::NotificationProducer::NotificationProducer(swss::DBConnector *db, const std::string &channel): | |||
There was a problem hiding this comment.
Updated. Hold on the change of channel name tagged dbId for Notification Producer/Consumer. Some lua scripts like pfc_restore.lua, pfe_detect are using redis PUBLISH command directly with hardcode channel name.
What I did In p4rt test scripts, bind response consumer to appl_state_db for consistency. Why I did it In p4orch, the relating notification producer for table P4RT_TABLE is on database appl state db How I verified it Run vstest Details if related notification channel name would be tagged dbId - sonic-net/sonic-swss-common#568
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…se ID (sonic-net#568)" This reverts commit bd4d0ce.
What I did In p4rt test scripts, bind response consumer to appl_state_db for consistency. Why I did it In p4orch, the relating notification producer for table P4RT_TABLE is on database appl state db How I verified it Run vstest Details if related notification channel name would be tagged dbId - sonic-net/sonic-swss-common#568
What I did In p4rt test scripts, bind response consumer to appl_state_db for consistency. Why I did it In p4orch, the relating notification producer for table P4RT_TABLE is on database appl state db How I verified it Run vstest Details if related notification channel name would be tagged dbId - sonic-net/sonic-swss-common#568
What I did In p4rt test scripts, bind response consumer to appl_state_db for consistency. Why I did it In p4orch, the relating notification producer for table P4RT_TABLE is on database appl state db How I verified it Run vstest Details if related notification channel name would be tagged dbId - sonic-net/sonic-swss-common#568
Uh oh!
There was an error while loading. Please reload this page.