-
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
replace kVertex with kTag #3286
replace kVertex with kTag #3286
Conversation
0b8da07
to
209e646
Compare
Codecov Report
@@ Coverage Diff @@
## master #3286 +/- ##
==========================================
+ Coverage 85.24% 85.28% +0.03%
==========================================
Files 1305 1305
Lines 120347 120343 -4
==========================================
+ Hits 102595 102634 +39
+ Misses 17752 17709 -43
Continue to review full report at Codecov.
|
@@ -12,12 +12,13 @@ | |||
namespace nebula { | |||
|
|||
enum class NebulaKeyType : uint32_t { | |||
kVertex = 0x00000001, | |||
kTag_ = 0x00000001, |
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.
kTag
?
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.
kTag
is defined in Base.h constexpr char kTag[] = "_tag";
.And compiler will report a warning if a local variable overwrite global variables.
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.
change the comments mentioned, and others LGTM.
@@ -75,14 +75,11 @@ class NebulaKeyUtils final { | |||
/** | |||
* Prefix for vertex |
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.
check the comment, other places may also need modify
@@ -41,7 +42,7 @@ static typename std::enable_if<std::is_integral<T>::value, T>::type readInt(cons | |||
} | |||
|
|||
// size of vertex key except vertexId |
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.
tag key
@@ -37,7 +37,7 @@ class StorageCompactionFilter final : public kvstore::KVFilter { | |||
return false; | |||
} | |||
|
|||
if (NebulaKeyUtils::isVertex(vIdLen_, key)) { | |||
if (NebulaKeyUtils::isTag(vIdLen_, key)) { | |||
return !vertexValid(spaceId, key, val); |
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.
should it be changed to tagValid
?
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.
Okey, I will fix it in next PR.
What type of PR is this?
What does this PR do?
Replace
KVertex
withKTag_
to support vertex without tagWhich issue(s)/PR(s) this PR relates to?
#3123
Special notes for your reviewer, ex. impact of this fix, etc:
Additional context:
Checklist:
Release notes:
Please confirm whether to reflect in release notes and how to describe: