-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
for (const auto& entry : delTags) { | ||
const auto& vId = entry.get_id().getStr(); | ||
for (const auto& tagId : entry.get_tags()) { | ||
auto key = NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vId, 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.
Shall we delete edge when delete last tag of 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.
We could consider later, this involves how we deal with dangle edges.
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 think we should keep same with delete vertex but it's difficult to do. So maybe could let delete tag can't delete the last tag.
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 delete tag need to keep same with delete vertex? We need to read once for each tag? Besides, how can we make sure the tag we are deleting is the last one? (We need to lock the vid prefix to make sure no one is doing insert/update)
Delete vertex need to be handled with txn.
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.
We could add a special tag with id 0, in this case delete tag won't delete 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.
This is not just the delete tag's problem. Since we allow dangling edges, we only handle delete last tag -> delete vertex
is meaningless.
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 job, the overall logic is fine for me.
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,nice job.
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.
Woohoo!
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
Rely on vesoft-inc/nebula-common#603