-
Notifications
You must be signed in to change notification settings - Fork 504
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
add rebuild(boolean) for index label create #1106
Conversation
implements: #1105 Change-Id: I09385b0fde907f4bdcbc3a06e17261f4ede5aab3
Codecov Report
@@ Coverage Diff @@
## master #1106 +/- ##
============================================
+ Coverage 60.35% 69.38% +9.02%
- Complexity 4709 5625 +916
============================================
Files 331 331
Lines 26997 27126 +129
Branches 3865 3898 +33
============================================
+ Hits 16295 18821 +2526
+ Misses 8915 6453 -2462
- Partials 1787 1852 +65 Continue to review full report at Codecov.
|
@@ -272,6 +274,7 @@ public void checkUpdate() { | |||
if (this.checkExist != null) { | |||
builder.checkExist(this.checkExist); | |||
} | |||
builder.rebuild(this.rebuild); |
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.
prefer keep "Boolean rebuild" define and call builder.rebuild(this.rebuild) if (this. rebuild != null)
if (!this.rebuild) { | ||
indexLabel.status(SchemaStatus.CREATED); | ||
this.graph().addIndexLabel(schemaLabel, indexLabel); | ||
return new IndexLabel.CreatedIndexLabel(indexLabel, null); |
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.
return ID_ZERO instead of null
@@ -225,7 +241,7 @@ public IndexLabel create() { | |||
IndexLabel.CreatedIndexLabel createdIndexLabel = this.createWithTask(); | |||
|
|||
Id task = createdIndexLabel.task(); | |||
if (task == null) { | |||
if (task == IdGenerator.ZERO) { |
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.
update comment at line 245
implements: #1105
Change-Id: I09385b0fde907f4bdcbc3a06e17261f4ede5aab3