-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix invalid filter in GetProp make storage crashed #4568
Conversation
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.
LGTM
@@ -73,6 +73,9 @@ class QueryUtils final { | |||
|
|||
if (nullType == NullType::UNKNOWN_PROP) { | |||
VLOG(1) << "Fail to read prop " << propName; | |||
if (!field) { |
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.
Why not just return null outside the if block?
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.
It is null here~ NullType::UNKNOWN_PROP
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.
IMO, NullType::UNKNOWN_PROP is not necessary, which can lead to more problems due to graphd's unreasonable handling of runtime errors.
For example, filter operator execution will throw a runtime error if UNKNOWN_PROP is fed to it.
nebula/src/graph/executor/query/FilterExecutor.cpp
Lines 67 to 69 in 7f185c9
if (val.isBadNull() || (!val.empty() && !val.isImplicitBool() && !val.isNull())) { | |
return Status::Error("Wrong type result, the type should be NULL, EMPTY, BOOL"); | |
} |
Co-authored-by: haowen <19355821+wenhaocs@users.noreply.github.com>
Co-authored-by: haowen <19355821+wenhaocs@users.noreply.github.com>
* fix lookup (#4552) fix Co-authored-by: jimingquan <mingquan.ji@vesoft.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * fix split brain in raft (#4479) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * fix invalid filter in GetProp make storage crashed (#4568) Co-authored-by: haowen <19355821+wenhaocs@users.noreply.github.com> * fix scan vertex/edge do not handle ttl (#4578) * fix scan vertex/edge do not handle ttl * use ErrorCode to unify community version and end version * Fix #1212. Return FoldConstantExprVisitor, if status_ already failed due to found syantax errors. (#4607) Co-authored-by: jie.wang <38901892+jievince@users.noreply.github.com> * Avoid fatal when expression illegal. (#4618) * Fix concurrent exception related to multi-match statement (#4605) * fix filter executor * Fix concurrency exception of multi-match statements fix iterator fix small delete small delete skip iterator type handle for concurrency small delete fix scan edges small delete small delete fix small delete small change small change fix ut small fix Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Prune properties(#4523) * fix conflict * extract attribute from properties function (#4604) * extract attribute from properties function * fix error * fix subscript error * add test case * process scanEdges * fix test error * add unwind & check vidType when executing not validate (#4456) * Update AppendVerticesExecutor.cpp fix conflict * Update AppendVerticesExecutor.cpp * Replace obsolete RocksDB API (#4395) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> * Update PrunePropertiesRule.feature * remove useless dc (#4533) * Update PrunePropertiesRule.feature * fix test error Co-authored-by: kyle.cao <kyle.cao@vesoft.com> Co-authored-by: jimingquan <mingquan.ji@vesoft.com> Co-authored-by: liwenhui-soul <38217397+liwenhui-soul@users.noreply.github.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> Co-authored-by: haowen <19355821+wenhaocs@users.noreply.github.com> Co-authored-by: Cheng Xuntao <7731943+xtcyclist@users.noreply.github.com> Co-authored-by: jie.wang <38901892+jievince@users.noreply.github.com> Co-authored-by: shylock <33566796+Shylock-Hg@users.noreply.github.com> Co-authored-by: Qiaolin Yu <90088090+Qiaolin-Yu@users.noreply.github.com>
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
https://github.com/vesoft-inc/nebula-ent/issues/1165
#4565
Description:
Invalid filter will make storage crash, this only happens in enterprise version with additional filter push down rule.
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc:
Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: