From 71744bde171569293826935b4d7caca4342a52b7 Mon Sep 17 00:00:00 2001 From: "b.tian" Date: Wed, 10 Jan 2024 14:38:46 +0800 Subject: [PATCH] fix commit log info -> debug --- .../java/org/tikv/txn/TwoPhaseCommitter.java | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) 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)