diff options
author | unknown <petr@mysql.com> | 2006-02-21 15:57:56 +0300 |
---|---|---|
committer | unknown <petr@mysql.com> | 2006-02-21 15:57:56 +0300 |
commit | 21aa5867142d421b34a3f04820fea6e6a9ea527c (patch) | |
tree | 97bed2340b3e2c7f36e6d1712661050cd07b1064 /server-tools/instance-manager/guardian.cc | |
parent | 4e69c153e31f16c2d46e9bd5cacc92b8e92cf00e (diff) | |
download | mariadb-git-21aa5867142d421b34a3f04820fea6e6a9ea527c.tar.gz |
Fix race condition: instance map wasn't locked for the
duration of the whole 'flush instances'. As a consequence,
it was possible to query instance map, while it is in the
inconsistent state. The patch was reworked after review.
server-tools/instance-manager/guardian.cc:
do not lock instance map in Guardian_thread::init()
server-tools/instance-manager/instance_map.cc:
Eliminate race condition: lock instance map and guardian
for the duration of the whole "FLUSH INSTANCES" execution.
server-tools/instance-manager/instance_map.h:
add new method. cleanup interface. add comments.
server-tools/instance-manager/manager.cc:
use instance_map.flush_instances instead of instance_map.load() and guardian_thread.init()
Diffstat (limited to 'server-tools/instance-manager/guardian.cc')
-rw-r--r-- | server-tools/instance-manager/guardian.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc index 291b685ef1b..7a532263846 100644 --- a/server-tools/instance-manager/guardian.cc +++ b/server-tools/instance-manager/guardian.cc @@ -256,7 +256,6 @@ int Guardian_thread::init() Instance *instance; Instance_map::Iterator iterator(instance_map); - instance_map->lock(); /* clear the list of guarded instances */ free_root(&alloc, MYF(0)); init_alloc_root(&alloc, MEM_ROOT_BLOCK_SIZE, 0); @@ -272,7 +271,6 @@ int Guardian_thread::init() } } - instance_map->unlock(); return 0; } |