diff --git a/fe/fe-core/src/main/java/com/starrocks/consistency/ConsistencyChecker.java b/fe/fe-core/src/main/java/com/starrocks/consistency/ConsistencyChecker.java index 3a277c1dc6f00..98bc248ef6a80 100644 --- a/fe/fe-core/src/main/java/com/starrocks/consistency/ConsistencyChecker.java +++ b/fe/fe-core/src/main/java/com/starrocks/consistency/ConsistencyChecker.java @@ -33,8 +33,15 @@ import com.starrocks.catalog.Partition; import com.starrocks.catalog.Table; import com.starrocks.common.Config; +<<<<<<< HEAD import com.starrocks.common.util.LeaderDaemon; import com.starrocks.common.util.TimeUtils; +======= +import com.starrocks.common.util.FrontendDaemon; +import com.starrocks.common.util.concurrent.FairReentrantReadWriteLock; +import com.starrocks.common.util.concurrent.lock.LockType; +import com.starrocks.common.util.concurrent.lock.Locker; +>>>>>>> 78c55933d6 ([BugFix] Consistency checker should use local time zone (#45749)) import com.starrocks.consistency.CheckConsistencyJob.JobState; import com.starrocks.persist.ConsistencyCheckInfo; import com.starrocks.server.GlobalStateMgr; @@ -42,6 +49,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Comparator; import java.util.Date; @@ -90,8 +99,19 @@ public ConsistencyChecker() { } private boolean initWorkTime() { - Date startDate = TimeUtils.getTimeAsDate(Config.consistency_check_start_time); - Date endDate = TimeUtils.getTimeAsDate(Config.consistency_check_end_time); + // Using system time zone. + SimpleDateFormat hourFormat = new SimpleDateFormat("HH"); + Date startDate; + Date endDate; + try { + startDate = hourFormat.parse(Config.consistency_check_start_time); + endDate = hourFormat.parse(Config.consistency_check_end_time); + LOG.info("parsed startDate: {}, endDate: {}", startDate, endDate); + } catch (ParseException e) { + LOG.error("failed to parse start/end time: {}, {}", Config.consistency_check_start_time, + Config.consistency_check_end_time, e); + return false; + } if (startDate == null || endDate == null) { return false;