This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch ChangeToDebugLevel in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a1f9293a9a6278d066e5e77000c9140397c01e92 Author: JackieTien97 <[email protected]> AuthorDate: Wed Nov 2 10:36:31 2022 +0800 Add debug level judgement firstly --- .../execution/fragment/FragmentInstanceStateMachine.java | 14 ++++++++------ .../apache/iotdb/db/mpp/plan/execution/QueryExecution.java | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/fragment/FragmentInstanceStateMachine.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/fragment/FragmentInstanceStateMachine.java index d19e2c7f35..2071fcc8b2 100644 --- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/fragment/FragmentInstanceStateMachine.java +++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/fragment/FragmentInstanceStateMachine.java @@ -75,12 +75,14 @@ public class FragmentInstanceStateMachine { instanceState = new StateMachine<>( "FragmentInstance " + fragmentInstanceId, executor, RUNNING, TERMINAL_INSTANCE_STATES); - instanceState.addStateChangeListener( - newState -> { - try (SetThreadName threadName = new SetThreadName(fragmentInstanceId.getFullId())) { - LOGGER.info("[StateChanged] To {}", newState); - } - }); + if (LOGGER.isDebugEnabled()) { + instanceState.addStateChangeListener( + newState -> { + try (SetThreadName threadName = new SetThreadName(fragmentInstanceId.getFullId())) { + LOGGER.debug("[StateChanged] To {}", newState); + } + }); + } } public long getCreatedTime() { diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java index 4f0cff7b29..88b954af7d 100644 --- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java +++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java @@ -297,7 +297,7 @@ public class QueryExecution implements IQueryExecution { public void doDistributedPlan() { DistributionPlanner planner = new DistributionPlanner(this.analysis, this.logicalPlan); this.distributedPlan = planner.planFragments(); - if (isQuery()) { + if (isQuery() && logger.isDebugEnabled()) { logger.debug( "distribution plan done. Fragment instance count is {}, details is: \n {}", distributedPlan.getInstances().size(),
