fix: run analyze every 3 hours (#2380)

This commit is contained in:
matt
2025-10-03 09:49:35 -04:00
committed by GitHub
parent 7f0d43eecc
commit bb1de91254
4 changed files with 4 additions and 10 deletions
@@ -288,10 +288,7 @@ func (o *OLAPControllerImpl) Start() (func() error, error) {
}
_, err = o.s.NewJob(
gocron.DailyJob(1, gocron.NewAtTimes(
// 5AM UTC
gocron.NewAtTime(5, 0, 0),
)),
gocron.DurationJob(3*time.Hour),
gocron.NewTask(
o.runAnalyze(ctx),
),
@@ -371,10 +371,7 @@ func (tc *TasksControllerImpl) Start() (func() error, error) {
}
_, err = tc.s.NewJob(
gocron.DailyJob(1, gocron.NewAtTimes(
// 5AM UTC
gocron.NewAtTime(5, 0, 0),
)),
gocron.DurationJob(3*time.Hour),
gocron.NewTask(
tc.runAnalyze(ctx),
),
+1 -1
View File
@@ -1822,7 +1822,7 @@ func (r *OLAPRepositoryImpl) StoreCELEvaluationFailures(ctx context.Context, ten
}
func (r *OLAPRepositoryImpl) AnalyzeOLAPTables(ctx context.Context) error {
const timeout = 1000 * 60 * 30 // 30 minute timeout
const timeout = 1000 * 60 * 60 // 60 minute timeout
tx, commit, rollback, err := sqlchelpers.PrepareTx(ctx, r.pool, r.l, timeout)
if err != nil {
+1 -1
View File
@@ -3406,7 +3406,7 @@ func (r *TaskRepositoryImpl) ListSignalCompletedEvents(ctx context.Context, tena
}
func (r *TaskRepositoryImpl) AnalyzeTaskTables(ctx context.Context) error {
const timeout = 1000 * 60 * 30 // 30 minute timeout
const timeout = 1000 * 60 * 60 // 60 minute timeout
tx, commit, rollback, err := sqlchelpers.PrepareTx(ctx, r.pool, r.l, timeout)
if err != nil {