Debug compression service

This commit is contained in:
Jan Eitzinger 2023-06-27 14:29:56 +02:00
parent 6cd98693c3
commit eb626db9c2
4 changed files with 7 additions and 1 deletions

View File

@ -520,7 +520,7 @@ func main() {
} }
if err != nil { if err != nil {
log.Warnf("Error while looking for retention jobs: %v", err) log.Warnf("Error while looking for compression jobs: %v", err)
} }
ar.Compress(jobs) ar.Compress(jobs)
}) })

View File

@ -801,9 +801,11 @@ func (r *JobRepository) FindJobsBetween(startTimeBegin int64, startTimeEnd int64
} }
if startTimeBegin == 0 { if startTimeBegin == 0 {
log.Infof("Find jobs before %d", startTimeEnd)
query = sq.Select(jobColumns...).From("job").Where(fmt.Sprintf( query = sq.Select(jobColumns...).From("job").Where(fmt.Sprintf(
"job.start_time < %d", startTimeEnd)) "job.start_time < %d", startTimeEnd))
} else { } else {
log.Infof("Find jobs between %d and %d", startTimeBegin, startTimeEnd)
query = sq.Select(jobColumns...).From("job").Where(fmt.Sprintf( query = sq.Select(jobColumns...).From("job").Where(fmt.Sprintf(
"job.start_time BETWEEN %d AND %d", startTimeBegin, startTimeEnd)) "job.start_time BETWEEN %d AND %d", startTimeBegin, startTimeEnd))
} }
@ -825,6 +827,7 @@ func (r *JobRepository) FindJobsBetween(startTimeBegin int64, startTimeEnd int64
jobs = append(jobs, job) jobs = append(jobs, job)
} }
log.Infof("Return job count %d", len(jobs))
return jobs, nil return jobs, nil
} }

View File

@ -30,6 +30,8 @@ file_bw_avg REAL NOT NULL DEFAULT 0.0,
file_data_vol_total REAL NOT NULL DEFAULT 0.0, file_data_vol_total REAL NOT NULL DEFAULT 0.0,
UNIQUE (job_id, cluster, start_time)); UNIQUE (job_id, cluster, start_time));
UPDATE job SET job_state='cancelled' WHERE job_state='canceled';
INSERT INTO job_new SELECT * FROM job; INSERT INTO job_new SELECT * FROM job;
DROP TABLE job; DROP TABLE job;
ALTER TABLE job_new RENAME TO job; ALTER TABLE job_new RENAME TO job;

View File

@ -372,6 +372,7 @@ func (fsa *FsArchive) CompressLast(starttime int64) int64 {
return starttime return starttime
} }
log.Infof("fsBackend Compress - start %d last %d", starttime, last)
os.WriteFile(filename, []byte(fmt.Sprintf("%d", starttime)), 0644) os.WriteFile(filename, []byte(fmt.Sprintf("%d", starttime)), 0644)
return last return last
} }