-
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 fetch prop on * vertexID with ttl #1937
Conversation
Ready to review? |
Yeah,I forgot to tag “ ready-for-testing” |
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 !
A suggest, extracting the buildEdgeTTLInfo same with buildTagTTLInfo as well.
Good catch. For consistency of code, I will fixed it |
@@ -88,6 +88,9 @@ kvstore::ResultCode QueryVertexPropsProcessor::collectVertexProps( | |||
// Already found the latest version. | |||
continue; | |||
} | |||
// Build TTL info | |||
buildTagTTLInfo(tagId); |
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.
Could you combine it with getTagTTLInfo. We don't need to lookup the hash map twice.
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.
Good catch,fixed it.
Please review it again.
please block it |
ok ,please review again |
folly::Optional<std::pair<std::string, int64_t>> ret; | ||
auto tagFound = tagTTLInfo_.find(tagId); | ||
if (tagFound != tagTTLInfo_.end()) { | ||
|
||
if (tagFound == tagTTLInfo_.end()) { |
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 have filled the tagTTLInfo_ in buildTTLInfoAndRespSchema, right?
So the changes here is just for fetch *, right?
I suggest you extract the common logic about filling tagTTLInfo_. And move the function into QueryVertexPropsProcessor
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.
Yeah,buildTTLInfoAndRespSchema
function fill the tagTTLInfo_
Butfetch *
do not do buildTTLInfoAndRespSchema
in QueryVertexPropsProcessor::process
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 suggest you extract the common logic about filling tagTTLInfo_. And move the function into QueryVertexPropsProcessor
ok
pr is ready, please continue |
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.
Fine. LGTM
Codecov Report
@@ Coverage Diff @@
## master #1937 +/- ##
==========================================
+ Coverage 86.90% 87.05% +0.14%
==========================================
Files 636 641 +5
Lines 59819 60909 +1090
==========================================
+ Hits 51984 53022 +1038
- Misses 7835 7887 +52
Continue to review full report at Codecov.
|
* fix fetch prop on * vertexID with ttl * address dangleptr's comment * address dangleptr's comments
Co-authored-by: kyle.cao <kyle.cao@vesoft.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
fix #1932 fetch * returns expired data
close #1932