|
24 | 24 | import org.apache.iotdb.commons.auth.AuthException; |
25 | 25 | import org.apache.iotdb.commons.concurrent.IoTDBThreadPoolFactory; |
26 | 26 | import org.apache.iotdb.commons.concurrent.ThreadName; |
27 | | -import org.apache.iotdb.commons.concurrent.threadpool.ScheduledExecutorUtil; |
28 | 27 | import org.apache.iotdb.commons.conf.CommonDescriptor; |
29 | 28 | import org.apache.iotdb.commons.consensus.ConsensusGroupId; |
30 | 29 | import org.apache.iotdb.commons.file.SystemFileFactory; |
|
64 | 63 | import java.util.Comparator; |
65 | 64 | import java.util.Optional; |
66 | 65 | import java.util.concurrent.ExecutorService; |
67 | | -import java.util.concurrent.ScheduledExecutorService; |
68 | 66 | import java.util.concurrent.TimeUnit; |
69 | 67 | import java.util.regex.Matcher; |
70 | 68 | import java.util.regex.Pattern; |
@@ -414,7 +412,7 @@ private SimpleConsensusPersistResult persistPlanForSimpleConsensus(ConfigPhysica |
414 | 412 | new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()) |
415 | 413 | .setMessage( |
416 | 414 | ConfigNodeMessages.PERSIST_CONFIGNODE_SIMPLECONSENSUS_LOG_FAILED |
417 | | - + String.valueOf(e.getMessage()))); |
| 415 | + + e.getMessage())); |
418 | 416 | } |
419 | 417 | return SimpleConsensusPersistResult.success( |
420 | 418 | persistedLogFile, logFileSizeBeforeWrite, endIndexBeforeWrite); |
@@ -497,27 +495,6 @@ private void initStandAloneConfigNode() { |
497 | 495 | } |
498 | 496 | startIndex = endIndex + 1; |
499 | 497 | 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 | | - } |
521 | 498 | } |
522 | 499 |
|
523 | 500 | private void createLogFile(int startIndex) { |
|
0 commit comments