-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve Consumer interface to support ZMQ based Producer/Consumer table. #2562
Improve Consumer interface to support ZMQ based Producer/Consumer table. #2562
Conversation
/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). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There are few UTs randomly failed, every time failed UTs are different. |
cfgmgr/intfmgr.cpp
Outdated
@@ -45,12 +45,12 @@ IntfMgr::IntfMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, c | |||
{ | |||
auto subscriberStateTable = new swss::SubscriberStateTable(stateDb, | |||
STATE_PORT_TABLE_NAME, TableConsumable::DEFAULT_POP_BATCH_SIZE, 100); | |||
auto stateConsumer = new Consumer(subscriberStateTable, this, STATE_PORT_TABLE_NAME); | |||
auto stateConsumer = new TableConsumer(subscriberStateTable, this, STATE_PORT_TABLE_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify the following:
- Is this interface generic, that both zmq and redis are supported?
- If not, how do we ensure backward compatibility? For e.g, warmboot cases
- Can we reuse the existing infra and chose zmq for only certain cases (like dash)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Is this interface generic, that both zmq and redis are supported?
Yes, this change is generic, TableConsumer is for redis, for ZMQ ther will be a ZmqConsumer add by another PR, here is POC pr show all change: https://github.com/sonic-net/sonic-swss/pull/2560/files -
If not, how do we ensure backward compatibility? For e.g, warmboot cases
This PR only change interface, still using redis based consumer after this PR. will not break any backward compatibility. -
Can we reuse the existing infra and chose zmq for only certain cases (like dash)
Yes, we still using existing infra in most case. the current plan is only use ZMQ for dash.
This can be done by change code in Orch::addConsumer(), when add consumer for dash related tables, add a ZqmConsumer, for all other case still add TableConsumer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, if TableConsumer
and Consumer
are both for redis, then why change the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'Consumer' now become a base class, and 'TableConsumer' is only for Redis based swss::SubscriberStateTable and swss::ConsumerStateTable, in another PR, I will add 'ZmqConsumer' class for swss::ZmqConsumerStateTable.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
UT failed because test case found 2 virtual route, still investigation why this happen, maybe a random issue: 2023-01-12T13:05:51.9237991Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
352696f
to
a77db41
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Created Dash side PR for review: https://github.com/nvidia-sonic/sonic-swss/pull/1 |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
12b6892
to
47e5a1b
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
dca13df
to
c7e4cee
Compare
…le. (sonic-net#2562) **What I did** Improve Consumer interface to support ZMQ based Producer/Consumer table. **Why I did it** To improve route create performance, swsscommon lib will add ZMQ based Producer/Consumer table. Because currently Consumer interface only support Redis based Producer/Consumer table, so improve this interface to support ZMQ based Producer/Consumer table. ZMQ based Producer/Consumer table can find in this PR: sonic-net/sonic-swss-common#715 **How I verified it** Pass all UT. **Details if related**
…le. (#2562) (#2778) This is a cherry-pick PR for #2562 **What I did** Improve Consumer interface to support ZMQ based Producer/Consumer table. **Why I did it** To improve route create performance, swsscommon lib will add ZMQ based Producer/Consumer table. Because currently Consumer interface only support Redis based Producer/Consumer table, so improve this interface to support ZMQ based Producer/Consumer table. ZMQ based Producer/Consumer table can find in this PR: sonic-net/sonic-swss-common#715 **How I verified it** Pass all UT. **Details if related** <!-- Please make sure you have read and understood the contribution guildlines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md 1. Make sure your commit includes a signature generted with `git commit -s` 2. Make sure your commit title follows the correct format: [component]: description 3. Make sure your commit message contains enough details about the change and related tests 4. Make sure your pull request adds related reviewers, asignees, labels Please also provide the following information in this pull request: --> **What I did** **Why I did it** **How I verified it** **Details if related**
What I did
Improve Consumer interface to support ZMQ based Producer/Consumer table.
Why I did it
To improve route create performance, swsscommon lib will add ZMQ based Producer/Consumer table.
Because currently Consumer interface only support Redis based Producer/Consumer table, so improve this interface to support ZMQ based Producer/Consumer table.
ZMQ based Producer/Consumer table can find in this PR: sonic-net/sonic-swss-common#715
How I verified it
Pass all UT.
Details if related