diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2017-02-28 15:23:44 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2017-03-01 11:35:24 +0400 |
commit | e9ad4bdb4252e0a4a3799364e9a27c3865a19df1 (patch) | |
tree | 200cdb1400a5506eccf43bc27d1057f36a47e8fb /sql/rpl_mi.cc | |
parent | cc413ce9a368b930aba5e63c0ab013f7b3ab3c04 (diff) | |
download | mariadb-git-e9ad4bdb4252e0a4a3799364e9a27c3865a19df1.tar.gz |
MDEV-11221 - main.events_restart failed in bb
Applied lost in a merge revision 7f38a07:
MDEV-10043 - main.events_restart fails sporadically in buildbot (crashes upon
shutdown)
There was race condition between shutdown thread and event worker threads.
Shutdown thread waits for thread_count to become 0 in close_connections(). It
may happen so that event worker thread was started but didn't increment
thread_count by this time. In this case shutdown thread may miss wait for this
working thread and continue deinitialization. Worker thread in turn may continue
execution and crash on deinitialized data.
Fixed by incrementing thread_count before thread is actually created like it is
done for connection threads.
Also let event scheduler not to inc/dec running threads counter for symmetry
with other "service" threads.
Diffstat (limited to 'sql/rpl_mi.cc')
0 files changed, 0 insertions, 0 deletions