Skip to content
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

Fix: not to use blocking get_all() after keys() #255

Merged
merged 1 commit into from
May 2, 2022

Conversation

qiluo-msft
Copy link
Contributor

- What I did
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().

Prevent unnecessary timeout of blocking get_all().

- How I did it

- How to verify it

- Description for the changelog

In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().
@SuvarnaMeenakshi
Copy link
Contributor

Going ahead, how do we figure out if we have to use blocking call or not for a given Table in DB?
Are we planning to change all blocking calls to non-blocking?

@SuvarnaMeenakshi
Copy link
Contributor

Going ahead, how do we figure out if we have to use blocking call or not for a given Table in DB? Are we planning to change all blocking calls to non-blocking?
Closing this comment, fixing only in functions which have keys/get_all calls.

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@qiluo-msft qiluo-msft merged commit 57f1af6 into sonic-net:master May 2, 2022
@qiluo-msft qiluo-msft deleted the qiluo/noblockkey branch May 2, 2022 22:48
qiluo-msft added a commit that referenced this pull request May 3, 2022
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().

Prevent unnecessary timeout of blocking get_all().
qiluo-msft added a commit that referenced this pull request May 5, 2022
Follow up #255.
If route change too fast between keys/hgetall, the original implementation will throw exception and lead to ERR in syslog.
qiluo-msft added a commit to qiluo-msft/sonic-snmpagent that referenced this pull request May 5, 2022
Follow up sonic-net#255.
If route change too fast between keys/hgetall, the original implementation will throw exception and lead to ERR in syslog.
qiluo-msft added a commit that referenced this pull request May 5, 2022
… does not exist, skip (#258)

Manual cherry-pick below commits and resolve conflicts.

1477c36 2022-05-04 | Fix: if routestr does not exist, skip (#257) [Qi Luo]
57f1af6 2022-05-02 | Fix: not to use blocking get_all() after keys() (#255) [Qi Luo]
judyjoseph pushed a commit that referenced this pull request May 8, 2022
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().

Prevent unnecessary timeout of blocking get_all().
judyjoseph pushed a commit that referenced this pull request May 8, 2022
Follow up #255.
If route change too fast between keys/hgetall, the original implementation will throw exception and lead to ERR in syslog.
qiluo-msft added a commit that referenced this pull request May 10, 2022
Follow up #255.
If route change too fast between keys/hgetall, the original implementation will throw exception and lead to ERR in syslog.
abdosi pushed a commit that referenced this pull request May 17, 2022
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().

Prevent unnecessary timeout of blocking get_all().
pttch pushed a commit to pttch/sonic-snmpagent that referenced this pull request May 6, 2024
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().
Prevent unnecessary timeout of blocking get_all().
Add more snmp no blocking fix for sonic-net#255

- How I did it
Modify the blocking mode from True to False

- How to verify it
Use server to send with 1000 requests/second. Keep test for weekend and it do not happen.
pttch added a commit to pttch/sonic-snmpagent that referenced this pull request May 7, 2024
In a dynamic environment, it is possible that some of the keys may
disappear between invoking keys() and get_all().
Prevent unnecessary timeout of blocking get_all().
Add more snmp no blocking fix for sonic-net#255

- How I did it
Modify the blocking mode from True to False

- How to verify it
Use server to send with 1000 requests/second. Keep test for weekend and it do not happen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants