-
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
ignore existed index #3392
ignore existed index #3392
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3392 +/- ##
==========================================
+ Coverage 85.19% 85.21% +0.02%
==========================================
Files 1304 1304
Lines 121308 121347 +39
==========================================
+ Hits 103352 103410 +58
+ Misses 17956 17937 -19
Continue to review full report at Codecov.
|
LOOKUP ON person WHERE person.id == 1 YIELD id(vertex) as id person.id == 2? |
after this, when running rebuild index, what's the behavior for "200" vertext? |
My bad, 👍 |
Both person.id == 1 and person.id == 2 will satisfy |
There are memory corruption, hold on one second. Ready now |
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!
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.
Nice and clean. Great job.
@@ -162,7 +162,7 @@ static constexpr size_t kCommentLengthLimit = 256; | |||
%token KW_BOOL KW_INT8 KW_INT16 KW_INT32 KW_INT64 KW_INT KW_FLOAT KW_DOUBLE | |||
%token KW_STRING KW_FIXED_STRING KW_TIMESTAMP KW_DATE KW_TIME KW_DATETIME | |||
%token KW_GO KW_AS KW_TO KW_USE KW_SET KW_FROM KW_WHERE KW_ALTER | |||
%token KW_MATCH KW_INSERT KW_VALUE KW_VALUES KW_YIELD KW_RETURN KW_CREATE KW_VERTEX KW_VERTICES | |||
%token KW_MATCH KW_INSERT KW_VALUE KW_VALUES KW_YIELD KW_RETURN KW_CREATE KW_VERTEX KW_VERTICES KW_IGNORE_EXISTED_INDEX |
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.
emm.. This IGNORE_EXISTED_INDEX
keyword is a little complicated to use, maybe it's better to split it into some words such as:
INSERT VERTEX IGNORE EXISTS INDEX ...
reference mysql insert ignore statement.
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 understand, but this is for almost the only one poc. They have used it since 1.X... Maybe just keep it.
Mainly for POC, same as 1.0. If specified with IGNORE_EXISTED_INDEX, we won't read or delete old index when insert. It could be useful when we do the first import, or the index is rarely modified.
Pros: no more read old value or delete old index when we insert, only write will be involved, same as no index, performance will get a great improvement.
Cons: since we don't delete index, lookup will read some wrong data. User should really be careful about this
For example :
Documents may or may not add this
IGNORE_EXISTED_INDEX
(up to you guys), if it is misused, wrong data will be looked up.