Skip to content

mxqkill: Correct job counts for cancelled groups #155

Merged
merged 1 commit into from Jan 8, 2024
Merged

mxqkill: Correct job counts for cancelled groups #155

merged 1 commit into from Jan 8, 2024

Conversation

donald
Copy link
Contributor

@donald donald commented Jan 8, 2024

Commit 22aadf3 ("sql: Implement mx_update_job2 trigger") eliminated the INQ->CANCELLED housekeeping trigger, claiming that the job state is no longer set to CANCELLED by code.

This is incorrect, as update_job_status_cancelled_by_group() still sets the job status to CANCELLED when a group is cancelled.

Modify update_job_status_cancelled_by_group() to set the job_cancelled flag instead of the job_status. Leave the job status transition to the trigger.

Exclude ASSIGNED jobs, as the daemon handles them. Also, remove unnecessary checks for unset host_hostname, server_id, and host_pid.

Fixes #154

Commit 22aadf3 ("sql: Implement mx_update_job2 trigger")
eliminated the `INQ`->`CANCELLED` housekeeping trigger, claiming that
the job state is no longer set to `CANCELLED` by code.

This is incorrect, as update_job_status_cancelled_by_group() still sets
the job status to `CANCELLED` when a group is cancelled.

Modify update_job_status_cancelled_by_group() to set the `job_cancelled`
flag instead of the `job_status`. Leave the job status transition to the
trigger.

Exclude `ASSIGNED` jobs, as the daemon handles them. Also, remove
unnecessary checks for unset `host_hostname`, `server_id`, and
`host_pid`.
@donald donald merged commit cd68e5c into master Jan 8, 2024
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Groups job counts wrong after group is killed.
1 participant