Skip to content

Commit

Permalink
Remove job status cancelling
Browse files Browse the repository at this point in the history
Remove the obsolete job status CANCELLING.

Also remove the "* -> NOT IN [ CANCELLING(989) | CANCELLED(990) ]"
trigger, which would reduce to "* -> CANCELLED(990)", but the only
transition to CANCELLED is from INQ where there is no job run time
statistics which would be needed to accumulate into mxq_group.
  • Loading branch information
donald committed Dec 28, 2023
1 parent e334ba7 commit 715af81
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions mxq_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ char *mxq_job_status_to_name(uint64_t status)
return "failed";
case MXQ_JOB_STATUS_CANCELLED:
return "cancelled";
case MXQ_JOB_STATUS_CANCELLING:
return "cancelling";
case MXQ_JOB_STATUS_UNKNOWN:
return "unknown";
case MXQ_JOB_STATUS_FINISHED:
Expand Down
2 changes: 0 additions & 2 deletions mxq_job.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ struct mxq_job {
#define MXQ_JOB_STATUS_KILLED 400
#define MXQ_JOB_STATUS_FAILED 750

#define MXQ_JOB_STATUS_CANCELLING 989

#define MXQ_JOB_STATUS_CANCELLED 990
#define MXQ_JOB_STATUS_UNKNOWN 999
#define MXQ_JOB_STATUS_FINISHED 1000
Expand Down
15 changes: 0 additions & 15 deletions mysql/create_trigger.sql
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,6 @@ CREATE TRIGGER mxq_update_job BEFORE UPDATE ON mxq_job
group_jobs_running = group_jobs_running - 1,
group_slots_running = group_slots_running - OLD.host_slots
WHERE group_id = NEW.group_id;

-- * -> NOT IN [ CANCELLING(989) | CANCELLED(990) ]
ELSEIF NEW.job_status NOT IN (989, 990) THEN

UPDATE mxq_group SET
stats_max_sumrss = GREATEST(stats_max_sumrss, NEW.stats_max_sumrss),
stats_max_maxrss = GREATEST(stats_max_maxrss, NEW.stats_maxrss),
stats_max_utime_sec = GREATEST(stats_max_utime_sec, NEW.stats_utime_sec),
stats_max_stime_sec = GREATEST(stats_max_stime_sec, NEW.stats_stime_sec),
stats_max_real_sec = GREATEST(stats_max_real_sec, NEW.stats_real_sec),
stats_total_utime_sec = stats_total_utime_sec+NEW.stats_utime_sec,
stats_total_stime_sec = stats_total_stime_sec+NEW.stats_stime_sec,
stats_total_real_sec = stats_total_real_sec+NEW.stats_real_sec
WHERE group_id = NEW.group_id;

END IF;
END IF;
END;
Expand Down
1 change: 0 additions & 1 deletion web/pages/mxq/mxq.in
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ sub db_init {
KILLED => 400,
FAILED => 750,
UNKNOWN_PRE => 755,
CANCELLING => 989,
CANCELLED => 990,
UNKNOWN => 999,
FINISHED => 1000,
Expand Down

0 comments on commit 715af81

Please sign in to comment.