Skip to content
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

Merged
merged 3 commits into from
Mar 19, 2020
Merged

fix fetch prop on * vertexID with ttl #1937

merged 3 commits into from
Mar 19, 2020

Conversation

panda-sheep
Copy link
Contributor

fix #1932 fetch * returns expired data
close #1932

@bright-starry-sky
Copy link
Contributor

Ready to review?

@jude-zhu jude-zhu added this to the R201910_RC4 milestone Mar 18, 2020
@panda-sheep panda-sheep added the ready-for-testing PR: ready for the CI test label Mar 18, 2020
@panda-sheep
Copy link
Contributor Author

Ready to review?

Yeah,I forgot to tag “ ready-for-testing”

Copy link
Contributor

@bright-starry-sky bright-starry-sky left a 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.

@panda-sheep
Copy link
Contributor Author

LGTM !
A suggest, extracting the buildEdgeTTLInfo same with buildTagTTLInfo as well.

Good catch.
I thought about what you said.
Different from tag, because build edge ttl info is used in one place.

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@panda-sheep
Copy link
Contributor Author

please block it
I simplify the code again

@panda-sheep
Copy link
Contributor Author

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()) {
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@panda-sheep
Copy link
Contributor Author

pr is ready, please continue

Copy link
Contributor

@dangleptr dangleptr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine. LGTM

@codecov-io
Copy link

Codecov Report

Merging #1937 into master will increase coverage by 0.14%.
The diff coverage is 94.74%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
src/graph/DescribeSpaceExecutor.h 0.00% <ø> (ø)
src/graph/FetchEdgesExecutor.h 0.00% <ø> (ø)
src/graph/FetchExecutor.cpp 87.77% <ø> (-0.53%) ⬇️
src/graph/FetchVerticesExecutor.h 0.00% <ø> (ø)
src/graph/GoExecutor.h 56.25% <ø> (ø)
src/graph/GraphService.h 100.00% <ø> (ø)
src/graph/PrivilegeExecutor.h 69.56% <ø> (+13.04%) ⬆️
src/graph/SequentialExecutor.h 0.00% <ø> (ø)
src/graph/UseExecutor.h 0.00% <ø> (ø)
src/graph/test/SchemaTest.cpp 96.27% <ø> (-1.07%) ⬇️
... and 90 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b08e0b...006aebd. Read the comment docs.

@dangleptr dangleptr merged commit 0265653 into vesoft-inc:master Mar 19, 2020
@panda-sheep panda-sheep deleted the TTL_fetch branch April 6, 2020 02:45
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
* fix fetch prop on * vertexID with ttl

* address dangleptr's comment

* address dangleptr's comments
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Jan 31, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fetch * returns expired data
5 participants