Skip to content

Commit

Permalink
fix bug: index rebuild exceeds 80w limit and 65536 cassandra limit
Browse files Browse the repository at this point in the history
fixed: #291

Change-Id: Iadf1b18c7a1be7a6343ae1fdeffbdb268ee1be90
  • Loading branch information
zhoney committed Dec 26, 2018
1 parent e8f81d4 commit 442521f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ private <T> void traverseByLabel(SchemaLabel label,
* Query.DEFAULT_CAPACITY to limit elements number per pass
*/
query.limit(Query.DEFAULT_CAPACITY);
query.capacity(Query.DEFAULT_CAPACITY);
query.capacity(Query.NO_CAPACITY);
query.eq(HugeKeys.LABEL, label.id());
int pass = 0;
int counter = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ protected void commit2Backend() {
this.commitMutation2Backend(mutation, txMutation);
}

@Override
public void commitIfGtSize(int size) throws BackendException {
int totalSize = this.mutationSize() +
this.indexTransaction().mutationSize();
if (totalSize >= size) {
this.commit();
}
}

@Override
public void rollback() throws BackendException {
try {
Expand Down

0 comments on commit 442521f

Please sign in to comment.