-
Notifications
You must be signed in to change notification settings - Fork 521
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
Commit index updates in batch #150
Conversation
} | ||
} | ||
this.rebuildIndex(HugeType.VERTEX, label, indexLabelIds, | ||
graphTx::queryVertices); |
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.
call graphTx.queryVerticesFromBackend() instead
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.
maybe it's better to keep the original to move this code to upper layer, just check no data in graphTx
query.eq(HugeKeys.LABEL, label); | ||
query.limit(Query.DEFAULT_CAPACITY); | ||
|
||
int i = 0; |
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.
int pass
} | ||
++counter; | ||
} | ||
} while (counter == Query.DEFAULT_CAPACITY); |
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.
assert counter <= Query.DEFAULT_CAPACITY
.job(callable); | ||
HugeTask<?> task = builder.schedule(); | ||
|
||
if (graph.configuration().get(CoreOptions.SCHEMA_SYNC_DELETION)) { |
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.
add some comments
protected static void removeSchema(SchemaTransaction tx, | ||
SchemaElement schema) { | ||
try { |
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.
add some comments why use reflection
1. To avoid commit all together during rebuilding index, especially for Cassandra backend, which has batch limit 65535 2. Also move async codes to com.baidu.hugegraph.job package 3. fix bug that CacheManager might create more than one cache with same name fixed: #144 implemented: #82 Change-Id: I88ff4bc878bc24122f0bb6ecf9964246a083b9ab
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!
especially for Cassandra backend, which has batch limit 65535
fixed: #144
implemented: #82
Change-Id: I88ff4bc878bc24122f0bb6ecf9964246a083b9ab