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

[lua]: use not command to check whether the field exists #492

Merged
merged 1 commit into from
May 2, 2018

Conversation

sihuihan88
Copy link
Contributor

@sihuihan88 sihuihan88 commented May 1, 2018

Signed-off-by: Sihui Han sihan@microsoft.com

What I did
Use not command to check whether the field exists
Why I did it
Redis will convert nil to false in lua script. Need to use "not a" instead of "a==nil"

Redis to Lua conversion table.
Redis integer reply -> Lua number
Redis bulk reply -> Lua string
Redis multi bulk reply -> Lua table (may have other Redis data types nested)
Redis status reply -> Lua table with a single ok field containing the status
Redis error reply -> Lua table with a single err field containing the error
Redis Nil bulk reply and Nil multi bulk reply -> Lua false boolean type

How I verified it

Details if related

Signed-off-by: Sihui Han <sihan@microsoft.com>
@lguohan lguohan merged commit f71005a into sonic-net:master May 2, 2018
@sihuihan88 sihuihan88 deleted the dev/sihan/lua branch May 2, 2018 18:31
lguohan pushed a commit that referenced this pull request May 2, 2018
Signed-off-by: Sihui Han <sihan@microsoft.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
sonic-net#492)

* [warm-reboot] initialize warm reboot state table before warm rebooting

Make sure that when the new image boots up, the component state won't
be 'reconciled'.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* fix typo

* optimize state deletion
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants