Skip to content

Commit

Permalink
continue run when meet exception during commit secondary key (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
marsishandsome authored Aug 12, 2020
1 parent 73817ba commit 841adf7
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ public ByteString next() {
private void doCommitSecondaryKeys(
Iterator<ByteString> keys, long commitTs, int commitBackOfferMS)
throws TiBatchWriteException {
TiBatchWriteException lastException = null;
try {
int taskBufferSize = writeThreadPerTask * 2;
int totalSize = 0, cnt = 0;
Expand Down Expand Up @@ -545,7 +546,12 @@ private void doCommitSecondaryKeys(
Thread.currentThread().interrupt();
throw new TiBatchWriteException("Current thread interrupted.", e);
} catch (ExecutionException e) {
throw new TiBatchWriteException("Execution exception met.", e);
lastException = new TiBatchWriteException("Execution exception met.", e);
LOG.warn("Execution exception met.", e);
}

if (lastException != null) {
throw lastException;
}
}

Expand Down

0 comments on commit 841adf7

Please sign in to comment.