mirror of https://github.com/tikv/client-java.git
fix prewrite & commit log info to debug(#776)
This commit is contained in:
parent
533dbc23a1
commit
aedfd66b88
|
|
@ -227,8 +227,9 @@ public class TwoPhaseCommitter implements AutoCloseable {
|
|||
this.doCommitPrimaryKeyWithRetry(backOffer, key, commitTs);
|
||||
}
|
||||
}
|
||||
|
||||
LOG.info("commit primary key {} successfully", KeyUtils.formatBytes(key));
|
||||
if (commitResult.isSuccess() && LOG.isDebugEnabled()) {
|
||||
LOG.debug("commit primary key {} successfully", KeyUtils.formatBytes(key));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -397,11 +398,13 @@ public class TwoPhaseCommitter implements AutoCloseable {
|
|||
BatchKeys batchKeys,
|
||||
Map<ByteString, Kvrpcpb.Mutation> mutations)
|
||||
throws TiBatchWriteException {
|
||||
LOG.debug(
|
||||
"start prewrite secondary key, row={}, size={}KB, regionId={}",
|
||||
batchKeys.getKeys().size(),
|
||||
batchKeys.getSizeInKB(),
|
||||
batchKeys.getRegion().getId());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(
|
||||
"start prewrite secondary key, row={}, size={}KB, regionId={}",
|
||||
batchKeys.getKeys().size(),
|
||||
batchKeys.getSizeInKB(),
|
||||
batchKeys.getRegion().getId());
|
||||
}
|
||||
|
||||
List<ByteString> keyList = batchKeys.getKeys();
|
||||
int batchSize = keyList.size();
|
||||
|
|
@ -445,11 +448,13 @@ public class TwoPhaseCommitter implements AutoCloseable {
|
|||
throw new TiBatchWriteException(errorMsg, e);
|
||||
}
|
||||
}
|
||||
LOG.debug(
|
||||
"prewrite secondary key successfully, row={}, size={}KB, regionId={}",
|
||||
batchKeys.getKeys().size(),
|
||||
batchKeys.getSizeInKB(),
|
||||
batchKeys.getRegion().getId());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(
|
||||
"prewrite secondary key successfully, row={}, size={}KB, regionId={}",
|
||||
batchKeys.getKeys().size(),
|
||||
batchKeys.getSizeInKB(),
|
||||
batchKeys.getRegion().getId());
|
||||
}
|
||||
}
|
||||
|
||||
private void appendBatchBySize(
|
||||
|
|
@ -592,11 +597,13 @@ public class TwoPhaseCommitter implements AutoCloseable {
|
|||
|
||||
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);
|
||||
|
|
@ -612,11 +619,13 @@ public class TwoPhaseCommitter implements AutoCloseable {
|
|||
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 (commitResult.isSuccess() && LOG.isDebugEnabled()) {
|
||||
LOG.debug(
|
||||
"commit {} rows successfully, size={}KB, regionId={}",
|
||||
batchKeys.getKeys().size(),
|
||||
batchKeys.getSizeInKB(),
|
||||
batchKeys.getRegion().getId());
|
||||
}
|
||||
}
|
||||
|
||||
private GroupKeyResult groupKeysByRegion(ByteString[] keys, int size, BackOffer backOffer)
|
||||
|
|
|
|||
Loading…
Reference in New Issue