You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/07/31 08:17:35 UTC

[GitHub] [kvrocks] enjoy-binbin opened a new pull request, #1625: Fix GEOSEARCH/GEOSEARCHSTORE FROMMEMBER against non existing src key reply

enjoy-binbin opened a new pull request, #1625:
URL: https://github.com/apache/kvrocks/pull/1625

   The new GEOSEARCH and GEOSEARCHSTORE commands was added
   in #1533. When typing FROMMEMBER option against non-existing
   src key, an IsNotFound error is return and resulting in the
   following inconsistency:
   ```
   127.0.0.1:6666> GEOSEARCH src FROMMEMBER Shenzhen BYBOX 88 88 m
   (error) ERR NotFound:
   127.0.0.1:6666> GEOSEARCHSTORE dst src FROMMEMBER Shenzhen BYBOX 88 88 m
   (error) ERR NotFound:
   
   127.0.0.1:6379> GEOSEARCH src FROMMEMBER Shenzhen BYBOX 88 88 m
   (empty array)
   127.0.0.1:6379> GEOSEARCHSTORE dst src FROMMEMBER Shenzhen BYBOX 88 88 m
   (integer) 0
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kvrocks] enjoy-binbin commented on a diff in pull request #1625: Fix GEOSEARCH/GEOSEARCHSTORE FROMMEMBER against non existing src key reply

Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on code in PR #1625:
URL: https://github.com/apache/kvrocks/pull/1625#discussion_r1278969779


##########
tests/gocase/unit/geo/geo_test.go:
##########
@@ -139,6 +139,11 @@ func TestGeo(t *testing.T) {
 		require.EqualValues(t, []interface{}{nil, nil, nil}, rdb.Do(ctx, "GEOHASH", "points", "a", "b", "c").Val())
 	})
 
+	t.Run("GEOSEARCH against non existing src key", func(t *testing.T) {
+		require.NoError(t, rdb.Del(ctx, "points").Err())
+		require.EqualValues(t, []interface{}([]interface {}{}), rdb.Do(ctx, "GEOSEARCH", "src", "FROMMEMBER", "Shenzhen", "BYBOX", 88, 88, "m").Val())

Review Comment:
   ```suggestion
   		require.EqualValues(t, []interface{}([]interface{}{}), rdb.Do(ctx, "GEOSEARCH", "src", "FROMMEMBER", "Shenzhen", "BYBOX", 88, 88, "m").Val())
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kvrocks] enjoy-binbin commented on a diff in pull request #1625: Fix GEOSEARCH/GEOSEARCHSTORE FROMMEMBER against non existing src key reply

Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on code in PR #1625:
URL: https://github.com/apache/kvrocks/pull/1625#discussion_r1278969779


##########
tests/gocase/unit/geo/geo_test.go:
##########
@@ -139,6 +139,11 @@ func TestGeo(t *testing.T) {
 		require.EqualValues(t, []interface{}{nil, nil, nil}, rdb.Do(ctx, "GEOHASH", "points", "a", "b", "c").Val())
 	})
 
+	t.Run("GEOSEARCH against non existing src key", func(t *testing.T) {
+		require.NoError(t, rdb.Del(ctx, "points").Err())
+		require.EqualValues(t, []interface{}([]interface {}{}), rdb.Do(ctx, "GEOSEARCH", "src", "FROMMEMBER", "Shenzhen", "BYBOX", 88, 88, "m").Val())

Review Comment:
   ```suggestion
   		require.EqualValues(t, []interface{}([]interface{}{}), rdb.Do(ctx, "GEOSEARCH", "src", "FROMMEMBER", "Shenzhen", "BYBOX", 88, 88, "m").Val())
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kvrocks] git-hulk merged pull request #1625: Fix GEOSEARCH/GEOSEARCHSTORE FROMMEMBER against non existing src key reply

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #1625:
URL: https://github.com/apache/kvrocks/pull/1625


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kvrocks] enjoy-binbin commented on pull request #1625: Fix GEOSEARCH/GEOSEARCHSTORE FROMMEMBER against non existing src key reply

Posted by "enjoy-binbin (via GitHub)" <gi...@apache.org>.
enjoy-binbin commented on PR #1625:
URL: https://github.com/apache/kvrocks/pull/1625#issuecomment-1657926743

   > Seems that geo not handle the return value of ZSet::Del(user_key), would this also need to be handled?
   
   i haven't looked at the store section below yet, just a quick look, looks like it doesn't need it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org