Skip to content

Commit 2e4c652

Browse files
committed
Update ConfigRegionStateMachine.java
1 parent 1b86d98 commit 2e4c652

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/ConfigRegionStateMachine.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.apache.iotdb.commons.auth.AuthException;
2525
import org.apache.iotdb.commons.concurrent.IoTDBThreadPoolFactory;
2626
import org.apache.iotdb.commons.concurrent.ThreadName;
27-
import org.apache.iotdb.commons.concurrent.threadpool.ScheduledExecutorUtil;
2827
import org.apache.iotdb.commons.conf.CommonDescriptor;
2928
import org.apache.iotdb.commons.consensus.ConsensusGroupId;
3029
import org.apache.iotdb.commons.file.SystemFileFactory;
@@ -64,7 +63,6 @@
6463
import java.util.Comparator;
6564
import java.util.Optional;
6665
import java.util.concurrent.ExecutorService;
67-
import java.util.concurrent.ScheduledExecutorService;
6866
import java.util.concurrent.TimeUnit;
6967
import java.util.regex.Matcher;
7068
import java.util.regex.Pattern;
@@ -414,7 +412,7 @@ private SimpleConsensusPersistResult persistPlanForSimpleConsensus(ConfigPhysica
414412
new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())
415413
.setMessage(
416414
ConfigNodeMessages.PERSIST_CONFIGNODE_SIMPLECONSENSUS_LOG_FAILED
417-
+ String.valueOf(e.getMessage())));
415+
+ e.getMessage()));
418416
}
419417
return SimpleConsensusPersistResult.success(
420418
persistedLogFile, logFileSizeBeforeWrite, endIndexBeforeWrite);
@@ -497,27 +495,6 @@ private void initStandAloneConfigNode() {
497495
}
498496
startIndex = endIndex + 1;
499497
createLogFile(startIndex);
500-
501-
ScheduledExecutorService simpleConsensusThread =
502-
IoTDBThreadPoolFactory.newSingleThreadScheduledExecutor(
503-
ThreadName.CONFIG_NODE_SIMPLE_CONSENSUS_WAL_FLUSH.getName());
504-
ScheduledExecutorUtil.safelyScheduleWithFixedDelay(
505-
simpleConsensusThread,
506-
this::flushWALForSimpleConsensus,
507-
0,
508-
CONF.getForceWalPeriodForConfigNodeSimpleInMs(),
509-
TimeUnit.MILLISECONDS);
510-
}
511-
512-
private void flushWALForSimpleConsensus() {
513-
if (simpleLogWriter != null) {
514-
try {
515-
simpleLogWriter.force();
516-
} catch (IOException e) {
517-
LOGGER.error(
518-
ConfigNodeMessages.CAN_T_FORCE_LOGWRITER_FOR_CONFIGNODE_FLUSHWALFORSIMPLECONSENSUS, e);
519-
}
520-
}
521498
}
522499

523500
private void createLogFile(int startIndex) {

0 commit comments

Comments
 (0)