-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GEO store commands not removing dst key when result set is empty (#…
…1755) If dst exists, when using the store variant, we need to delete the dst key when the result set is empty, like we are overwriting the dst key with an empty result set. This change covers the following commands and scenarios: - GEOSEARCHSTORE FROMMEMBER against non-existing src key. - GEOSEARCHSTORE FROMLONLAT against non-existing src key. - GEOSEARCHSTORE FROMLONLAT the search result set is empty. - GEORADIUS STORE Against non-existing src key. - GEORADIUS STORE search result set is empty. - GEORADIUSBYMEMBER STORE against non-existing src key. - GEORADIUSBYMEMBER STORE search result set is empty. While writing the test cases, we still have a issue, FROMMEMBER against non-existing src key member: ``` 127.0.0.1:6666> geoadd src 10 10 Shenzhen (integer) 1 127.0.0.1:6666> GEOSEARCHSTORE dst src FROMMEMBER Shenzhen_2 BYBOX 88 88 m (integer) 0 127.0.0.1:6379> GEOADD src 10 10 Shenzhen (integer) 1 127.0.0.1:6379> GEOSEARCHSTORE dst src FROMMEMBER Shenzhen_2 BYBOX 88 88 m (error) ERR could not decode requested zset member ``` Redis will return a specific error if the member does not exist, but Kvrocks currently handles it as if the src key does not exist, this will be addressed in a future PR since it require more works.
- Loading branch information
1 parent
11a0140
commit 4aa95fa
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters