-
Notifications
You must be signed in to change notification settings - Fork 290
Re-write sonic-db-cli with c++ for sonic startup performance issue #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-write sonic-db-cli with c++ for sonic startup performance issue #607
Conversation
common/redisreply.h
Outdated
private: | ||
void checkStatus(const char *status); | ||
void checkReply(); | ||
std::string to_string(redisReply *reply); |
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.
@@ -158,7 +159,7 @@ void RedisReply::checkReplyType(int expectedType) | |||
const char *err = (m_reply->type == REDIS_REPLY_STRING || m_reply->type == REDIS_REPLY_ERROR) ? | |||
m_reply->str : "NON-STRING-REPLY"; | |||
|
|||
string errmsg = "Expected to get redis type " + to_string(expectedType) + " got type " + to_string(m_reply->type) + ", err: " + err; | |||
string errmsg = "Expected to get redis type " + std::to_string(expectedType) + " got type " + std::to_string(m_reply->type) + ", err: " + err; |
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.
After integrate this change to sonic-buildimage repo, all E2E test passed: https://github.com/Azure/sonic-buildimage/pull/10825/checks |
) #### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: #10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Build and install c++ version sonic-db-cli from swss-common. #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
#### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Remove python version sonic-db-cli from swsssdk. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Remove python version sonic-db-cli from swsssdk #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
…onic-net#607) Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 Re-write sonic-cli with c++. Add c++ unit test to cover all code. Pass all E2E test scenario. <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 Re-write sonic-cli with c++ for sonic startup performance issue
#### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Remove python version sonic-db-cli from swsssdk. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Remove python version sonic-db-cli from swsssdk #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
) (#636) Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 Re-write sonic-cli with c++. Add c++ unit test to cover all code. Pass all E2E test scenario. <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 Re-write sonic-cli with c++ for sonic startup performance issue
#### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Remove python version sonic-db-cli from swsssdk. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Remove python version sonic-db-cli from swsssdk #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
…ic-net#10825) Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net#10218 ETA of this issue will be 2022/05/31 Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. Pass all E2E test scenario. <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 Build and install c++ version sonic-db-cli from swss-common. <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. -->
) (#11262) Fix sonic-db-cli high CPU usage on SONiC startup issue: #10218 ETA of this issue will be 2022/05/31 Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. Pass all E2E test scenario. <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 Build and install c++ version sonic-db-cli from swss-common. <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. -->
…onic-net#607) #### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++. #### How to verify it Add c++ unit test to cover all code. Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Re-write sonic-cli with c++ for sonic startup performance issue
) #### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net/sonic-buildimage#10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++. #### How to verify it Add c++ unit test to cover all code. Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Re-write sonic-cli with c++ for sonic startup performance issue
…ic-net#10825) Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net#10218 ETA of this issue will be 2022/05/31 Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. Pass all E2E test scenario. <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 Build and install c++ version sonic-db-cli from swss-common. <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. -->
) (#11713) Cherry pick PR #10825 to 202205 branch #### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: #10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Build and install c++ version sonic-db-cli from swss-common. #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
…ic-net#10825) (sonic-net#11713) Cherry pick PR sonic-net#10825 to 202205 branch #### Why I did it Fix sonic-db-cli high CPU usage on SONiC startup issue: sonic-net#10218 ETA of this issue will be 2022/05/31 #### How I did it Re-write sonic-cli with c++ in sonic-swss-common: sonic-net/sonic-swss-common#607 Modify swss-common rules and slave.mk to install c++ version sonic-db-cli. #### How to verify it Pass all E2E test scenario. #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 #### Description for the changelog Build and install c++ version sonic-db-cli from swss-common. #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration. --> #### A picture of a cute animal (not mandatory but encouraged)
Why I did it
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)