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

replace kVertex with kTag #3286

Merged
merged 8 commits into from
Nov 17, 2021

Conversation

cangfengzhs
Copy link
Contributor

What type of PR is this?

  • bug
  • feature
  • enhancement

What does this PR do?

Replace KVertex with KTag_ to support vertex without tag

Which issue(s)/PR(s) this PR relates to?

#3123

Special notes for your reviewer, ex. impact of this fix, etc:

Additional context:

Checklist:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatible (If it is incompatible, please describe it and add corresponding label.)
  • Need to cherry-pick (If need to cherry-pick to some branches, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to reflect in release notes and how to describe:

                                                            `

@cangfengzhs cangfengzhs added the ready-for-testing PR: ready for the CI test label Nov 8, 2021
@cangfengzhs cangfengzhs force-pushed the replace_kvertex_with_ktag branch from 0b8da07 to 209e646 Compare November 9, 2021 02:31
@cangfengzhs cangfengzhs marked this pull request as ready for review November 9, 2021 02:59
@cangfengzhs cangfengzhs requested review from critical27, nevermore3 and a team November 9, 2021 02:59
critical27
critical27 previously approved these changes Nov 9, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2021

Codecov Report

Merging #3286 (cb660aa) into master (fc2977b) will increase coverage by 0.03%.
The diff coverage is 96.89%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
src/common/utils/Types.h 100.00% <ø> (ø)
src/kvstore/plugins/elasticsearch/ESListener.cpp 0.00% <0.00%> (ø)
src/storage/mutate/DeleteTagsProcessor.cpp 62.36% <50.00%> (ø)
src/common/utils/NebulaKeyUtils.h 80.68% <71.42%> (ø)
src/common/utils/IndexKeyUtils.h 90.96% <100.00%> (-0.29%) ⬇️
src/common/utils/NebulaKeyUtils.cpp 94.19% <100.00%> (ø)
src/common/utils/test/NebulaKeyUtilsTest.cpp 100.00% <100.00%> (ø)
src/kvstore/Part.cpp 56.69% <100.00%> (+1.99%) ⬆️
src/kvstore/test/NebulaListenerTest.cpp 98.78% <100.00%> (ø)
src/kvstore/test/NebulaStoreTest.cpp 98.57% <100.00%> (ø)
... and 59 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 fc2977b...cb660aa. Read the comment docs.

@@ -12,12 +12,13 @@
namespace nebula {

enum class NebulaKeyType : uint32_t {
kVertex = 0x00000001,
kTag_ = 0x00000001,
Copy link
Contributor

Choose a reason for hiding this comment

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

kTag?

Copy link
Contributor Author

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.

@cangfengzhs cangfengzhs requested a review from a team November 12, 2021 02:13
@cangfengzhs cangfengzhs linked an issue Nov 15, 2021 that may be closed by this pull request
Copy link
Contributor

@pengweisong pengweisong left a 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
Copy link
Contributor

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

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

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?

Copy link
Contributor Author

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.

@critical27 critical27 merged commit 07d5e21 into vesoft-inc:master Nov 17, 2021
@Sophie-Xie Sophie-Xie added the doc affected PR: improvements or additions to documentation label Dec 28, 2021
@cooper-lzy cooper-lzy requested a review from foesa-yang January 5, 2022 03:41
@foesa-yang foesa-yang removed the doc affected PR: improvements or additions to documentation label Jan 5, 2022
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.

support vertices without tags
7 participants