-
Notifications
You must be signed in to change notification settings - Fork 539
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
A set STORE command doesn't properly overwrite an existing key #765
Comments
It's not about
Some fun with this in PowerShell using $db = Open-Redis
# set same key as String and Set
Set-RedisString test:dupe-key v1
Set-RedisSet test:dupe-key v2, v3
# 2 same keys exist in 2 stores
Search-RedisKey test:dupe-key
<# 2 keys
test:dupe-key
test:dupe-key
#>
# one is String
Get-RedisString test:dupe-key
<# String value
v1
#>
# another is Set
Get-RedisSet test:dupe-key
<# Set values
v2
v3
#> |
Thanks! I understand this issue better now. |
How important is it that the same key be prevented by the system from being used for the main and object store? Seems users can easily work around this. cc @TedHartMS |
Stating the obvious perhaps, for a key-value system uniqueness of keys is very important. Users may work around the current feature (not sure about "easily", depends). But users will be tripped over this anyway. Workarounds will come with some price. If the server does not want to pay it, then clients have to pay, arguably higher overall price. NB If the actual plan is to move to the single index and hence fix this issue then importance is probably low. It would be useful to mention the current feature somewhere in the docs, to minimize surprises. |
Describe the bug
SINTERSTORE
doesn't overwrite an existing string.SUNIONSTORE
andSDIFFSTORE
are also affected.Steps to reproduce the bug
Please see the following Python snippet. Commands executed in the CLI have the same results. The "expected" values come from Redis 7.4.1.
Expected behavior
No response
Screenshots
No response
Release version
v1.0.35
IDE
No response
OS version
Windows 11
Additional context
No response
The text was updated successfully, but these errors were encountered: