-
Notifications
You must be signed in to change notification settings - Fork 876
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
Add GeoRadiusByMember support #2107
Conversation
Signed-off-by: azuredream <zhaozixuan67@gmail.com>
src/server/zset_family.cc
Outdated
return OpStatus::OK; | ||
}; | ||
cntx->transaction->Schedule(); | ||
cntx->transaction->Execute(std::move(store_cb), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure which one should I use here. schedule-execute
or ScheduleSingleHopT
? It seems that I have to set "-4, 3, 3, 1" in Register
to use schedule-execute
. But got error message:
127.0.0.1:6379> GEORADIUSBYMEMBER Europe Madrid 700 KM WITHCOORD WITHDIST STORE test1
Error: Server closed the connection
The search part works as expected if I set "-4, 1, 1, 1" in Register
and use ScheduleSingleHopT
to get latitude and longitutde of a member.
I'd appreciate it if anyone could give me some advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not add support for STORE
and STOREDIST
options. There are several reasons for this:
- it requires some adjustments to our transactional framework to support this non-standard command layout
- this also requires advanced knowledge of how to build such commands.
Having said that, implementing all the other options will provide substantiation contribution and will make it easier for us to close the gaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your suggestion. I've updated my PR.
I'll be glad to make further changes to transactional framework if you could give me some suggestions.
Another thing on my to-do list is that GeoSearch fetches redundant data and subsequently filter them. To eliminate the intermediate result array, also requires some change to the standard search process which cannot take extra geo filter as input.
Signed-off-by: azuredream <zhaozixuan67@gmail.com>
Signed-off-by: azuredream <zhaozixuan67@gmail.com>
@azuredream if you want, please add disabled unit tests for the missing features (see |
#1548