Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/main/java/org/tikv/txn/TwoPhaseCommitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ private void doCommitPrimaryKeyWithRetry(BackOffer backOffer, ByteString key, lo
}
}

LOG.info("commit primary key {} successfully", KeyUtils.formatBytes(key));
if(LOG.isDebugEnabled()) {
LOG.debug("commit primary key {} successfully", KeyUtils.formatBytes(key));
}
}

/**
Expand Down Expand Up @@ -592,11 +594,13 @@ private void doCommitSecondaryKeysWithRetry(

private void doCommitSecondaryKeySingleBatchWithRetry(
BackOffer backOffer, BatchKeys batchKeys, long commitTs) throws TiBatchWriteException {
LOG.info(
"start commit secondary key, row={}, size={}KB, regionId={}",
batchKeys.getKeys().size(),
batchKeys.getSizeInKB(),
batchKeys.getRegion().getId());
if(LOG.isDebugEnabled()) {
LOG.debug(
"start commit secondary key, row={}, size={}KB, regionId={}",
batchKeys.getKeys().size(),
batchKeys.getSizeInKB(),
batchKeys.getRegion().getId());
}
List<ByteString> keysCommit = batchKeys.getKeys();
ByteString[] keys = new ByteString[keysCommit.size()];
keysCommit.toArray(keys);
Expand All @@ -612,11 +616,13 @@ private void doCommitSecondaryKeySingleBatchWithRetry(
LOG.warn(error);
throw new TiBatchWriteException("commit secondary key error", commitResult.getException());
}
LOG.info(
"commit {} rows successfully, size={}KB, regionId={}",
batchKeys.getKeys().size(),
batchKeys.getSizeInKB(),
batchKeys.getRegion().getId());
if(LOG.isDebugEnabled()) {
LOG.info(
"commit {} rows successfully, size={}KB, regionId={}",
batchKeys.getKeys().size(),
batchKeys.getSizeInKB(),
batchKeys.getRegion().getId());
}
}

private GroupKeyResult groupKeysByRegion(ByteString[] keys, int size, BackOffer backOffer)
Expand Down