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

Commit index updates in batch #150

Merged
merged 1 commit into from
Nov 1, 2018
Merged

Commit index updates in batch #150

merged 1 commit into from
Nov 1, 2018

Conversation

zhoney
Copy link
Contributor

@zhoney zhoney commented Oct 30, 2018

  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

javeme
javeme previously approved these changes Oct 30, 2018
}
}
this.rebuildIndex(HugeType.VERTEX, label, indexLabelIds,
graphTx::queryVertices);
Copy link
Contributor

Choose a reason for hiding this comment

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

call graphTx.queryVerticesFromBackend() instead

Copy link
Contributor

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

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

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

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

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

@Linary Linary left a comment

Choose a reason for hiding this comment

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

LGTM!

@Linary Linary merged commit fce75c1 into apache:master Nov 1, 2018
@zhoney zhoney deleted the master144 branch September 14, 2019 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

在无索引的数据上建索引是否会发生数据不一致
3 participants