-
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 store test case for GeoRadiusByMember #2210
Conversation
Please refer to PR2149 for the history. I encountered a wired issue. This command works in CLI:
The first unit test case worked as well. However, the second test case failed. Please note that this command worked in CLI. When I used GDB to run the test case line by line, it worked again. I suppose it's something to do with the schedule-execute model. |
src/server/zset_family.cc
Outdated
bool MembersOfAllNeighbors(ConnectionContext* cntx, string_view key, const GeoHashRadius& n, | ||
const GeoShape& shape_ref, GeoArray* ga, unsigned long limit) { | ||
const GeoShape& shape_ref, GeoArray* ga, unsigned long limit, |
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.
can it be that you call MembersOfAllNeighbors(...,, true, false)
?
src/server/zset_family.cc
Outdated
if (result.status() == OpStatus::WRONG_TYPE) { | ||
cntx->transaction->Schedule(); | ||
cntx->transaction->Execute(std::move(cb), false); | ||
if (member_score.status() == OpStatus::WRONG_TYPE) { |
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.
you can not call Execute(..)
and then exit early. In fact, please a test that runs this command on a wrong type and see the testing framework fails because of this early return.
If you want to return early you should call transaction->Conclude();
Signed-off-by: azuredream <zhaozixuan67@gmail.com>
Hi romange, I couldn't make Just updated my PR to add test cases and fixed a bug in GeoSearch. |
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.
Thank you for your contribution!
@azuredream I see you reverted the parsing code as well, is it intended? |
…STOREDIST Signed-off-by: azuredream <zhaozixuan67@gmail.com>
…am/dragonfly into GeoRadiusByMember_store
I just put the parsing code back. Thanks for the reminder |
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.
Thank you!
#1548