Skip to content
Snippets Groups Projects
Commit 5c5466c8 authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz Committed by Danny Auble
Browse files

Fix race between addto_update_list() and _commit_handler()

Bug 10027
parent 0ff53b2c
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,8 @@ documents those changes that are of interest to users and administrators.
-- MySQL - Stop steps from printing when outside time range.
-- Fixed kmem limit calculation to use MaxKmemPercent correctly.
-- Fix initialization of cpuset.mems/cpus on uid cgroup subdir.
-- MySQL - Remove potential race condition when sending updates to a cluster
and commit_delay used.
 
* Changes in Slurm 20.02.5
==========================
......
......@@ -181,11 +181,9 @@ extern int addto_update_list(List update_list, slurmdb_update_type_t type,
update_object = xmalloc(sizeof(slurmdb_update_object_t));
list_append(update_list, update_object);
update_object->type = type;
list_sort(update_list, (ListCmpF)_sort_update_object_dec);
switch(type) {
case SLURMDB_MODIFY_USER:
......@@ -279,11 +277,14 @@ extern int addto_update_list(List update_list, slurmdb_update_type_t type,
return SLURM_SUCCESS;
case SLURMDB_UPDATE_NOTSET:
default:
slurmdb_destroy_update_object(update_object);
error("unknown type set in update_object: %d", type);
return SLURM_ERROR;
}
debug4("XXX: update object with type %d added", type);
list_append(update_object->objects, object);
list_append(update_list, update_object);
list_sort(update_list, (ListCmpF)_sort_update_object_dec);
return SLURM_SUCCESS;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment