-
Notifications
You must be signed in to change notification settings - Fork 163
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
[ycabled] move swsscommon API's from subroutines to call them exactly once per task_worker/thread #303
Conversation
once Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
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 take care of comments
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 1 alert when merging 3924d75 into 23b6970 - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
This pull request introduces 2 alerts when merging 7556185 into 4ea12cf - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging ac2888d into 4ea12cf - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 717e599 into 4ea12cf - view on LGTM.com new alerts:
|
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
#310 added in 202012 |
… once per task_worker/thread (#303) This PR attempts for ycabled to have all swsscommon.Table and daemon_base.db_connect as just a single call in the thread instance for all task_workers For example all swsscommon calls to open Tables are moved as class object varables, which are reused when needed instead of opening the Table again in subroutines. self.config_db[asic_id] = daemon_base.db_connect("CONFIG_DB", namespace) This would help in avoiding unforeseen redis-errors Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Description Motivation and Context How Has This Been Tested? Deploying changes on testbed and UT
This PR attempts for ycabled to have all
swsscommon.Table and daemon_base.db_connect
as just a single call in the thread instance for all task_workers
For example all swsscommon calls to open Tables are moved as class object varables, which are reused when needed instead of opening the Table again in subroutines.
This would help in avoiding unforeseen redis-errors
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
Description
Motivation and Context
How Has This Been Tested?
Deploying changes on testbed and UT
Additional Information (Optional)