-
Notifications
You must be signed in to change notification settings - Fork 265
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
Merged
liuh-80
merged 21 commits into
sonic-net:master
from
liuh-80:dev/liuh/rewrite-sonic-cli
May 26, 2022
Merged
Re-write sonic-db-cli with c++ for sonic startup performance issue #607
liuh-80
merged 21 commits into
sonic-net:master
from
liuh-80:dev/liuh/rewrite-sonic-cli
May 26, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
6 tasks
liuh-80
commented
Apr 24, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
Apr 29, 2022
qiluo-msft
reviewed
May 9, 2022
qiluo-msft
reviewed
May 12, 2022
qiluo-msft
reviewed
May 24, 2022
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.
qiluo-msft
reviewed
May 24, 2022
@@ -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 |
qiluo-msft
approved these changes
May 26, 2022
liuh-80
added a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Jun 1, 2022
) #### 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)
liuh-80
added a commit
to sonic-net/sonic-py-swsssdk
that referenced
this pull request
Jun 1, 2022
#### 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)
liuh-80
added a commit
to liuh-80/sonic-swss-common
that referenced
this pull request
Jun 22, 2022
…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
liuh-80
added a commit
to liuh-80/sonic-py-swsssdk
that referenced
this pull request
Jun 22, 2022
#### 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)
liuh-80
added a commit
that referenced
this pull request
Jun 23, 2022
) (#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
liuh-80
added a commit
to sonic-net/sonic-py-swsssdk
that referenced
this pull request
Jun 23, 2022
#### 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)
liuh-80
added a commit
to liuh-80/sonic-buildimage
that referenced
this pull request
Jun 27, 2022
…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. -->
liuh-80
added a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Jun 30, 2022
) (#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. -->
itamar-talmon
pushed a commit
to itamar-talmon/sonic-swss-common
that referenced
this pull request
Jul 19, 2022
…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
yxieca
pushed a commit
that referenced
this pull request
Aug 8, 2022
) #### 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
liuh-80
added a commit
to liuh-80/sonic-buildimage
that referenced
this pull request
Aug 12, 2022
…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. -->
liuh-80
added a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Aug 17, 2022
) (#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)
skbarista
pushed a commit
to skbarista/sonic-buildimage
that referenced
this pull request
Aug 17, 2022
…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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)