diff --git a/src/main/java/org/tikv/txn/TwoPhaseCommitter.java b/src/main/java/org/tikv/txn/TwoPhaseCommitter.java index 550b7de47ac..71c600129a6 100644 --- a/src/main/java/org/tikv/txn/TwoPhaseCommitter.java +++ b/src/main/java/org/tikv/txn/TwoPhaseCommitter.java @@ -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)); + } } /** @@ -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 keysCommit = batchKeys.getKeys(); ByteString[] keys = new ByteString[keysCommit.size()]; keysCommit.toArray(keys); @@ -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)