You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think even if you could create an entry with space in DB, the underlying infra may fail since some of these translates directly to create an entry in linux kernel where space is not allowed. So IMO, this is a general restriction.
The no space rule only seem to apply if the user wants to check if an entry already exists. Presumably the underlying infra would see an issue when the entry is created., Not when something checks if it already exists?
When checking if a redis entry exists the key isn't allowed to have any spaces:
https://github.com/Azure/sonic-swss-common/blob/master/common/dbconnector.cpp#L609-L613
However, that restriction doesn't seem to be enforced when creating (i.e. SET) or reading keys (i.e. KEYS). I was able to create an entry like:
Is there a technical reason for this? I guess we can use KEYS to check for existence, but the O(1) time complexity of exists is much nicer.
The text was updated successfully, but these errors were encountered: