Skip to content

Commit

Permalink
[BugFix] reset the start time before execution (backport #55433) (#55468
Browse files Browse the repository at this point in the history
)

Co-authored-by: Murphy <[email protected]>
  • Loading branch information
mergify[bot] and murphyatwork authored Jan 27, 2025
1 parent b049258 commit 24f290e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public interface AnalyzeStatus {

LocalDateTime getEndTime();

void setStartTime(LocalDateTime endTime);

void setEndTime(LocalDateTime endTime);

void setStatus(StatsConstants.ScheduleStatus status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ public LocalDateTime getEndTime() {
return endTime;
}

@Override
public void setStartTime(LocalDateTime startTime) {
this.startTime = startTime;
}

@Override
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ public LocalDateTime getEndTime() {
return endTime;
}

@Override
public void setStartTime(LocalDateTime startTime) {
this.startTime = startTime;
}

@Override
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public static void triggerCollectionOnFirstLoad(
try {
future = GlobalStateMgr.getCurrentAnalyzeMgr().getAnalyzeTaskThreadPool()
.submit(() -> {
analyzeStatus.setStartTime(LocalDateTime.now());
StatisticExecutor statisticExecutor = new StatisticExecutor();
ConnectContext statsConnectCtx = StatisticUtils.buildConnectContext();
statsConnectCtx.setThreadLocalInfo();
Expand Down

0 comments on commit 24f290e

Please sign in to comment.