mariadb/tpool
Vladislav Vaintroub c20bf8fd49 MDEV-21551 Fix calculation of current concurrency level in
maybe_wake_or_create_thread()

A task that is executed,could be counted as waiting (after wait_begin()
before wait_end()) or as long-running (callback runs for a long time).

If task is both marked waiting and long running, then calculation of
current concurrency (# of executing tasks - # of long tasks - #of waiting tasks)
is wrong, as task is counted twice.

Thus current concurrency could go negative, but with unsigned arithmetic
it will become a huge number.

As a result, maybe_wake_or_create_thread() would neither wake or create
a thread, when it should. Which may result in a deadlock.
2020-01-22 00:01:25 +01:00
..
aio_linux.cc MDEV-16264: Minor cleanup 2019-12-03 11:05:18 +02:00
aio_simulated.cc MDEV-16264: Minor cleanup 2019-12-03 11:05:18 +02:00
aio_win.cc MDEV-16264: Add threadpool library 2019-11-15 16:50:22 +01:00
CMakeLists.txt MDEV-16264 - some improvements 2019-12-09 21:12:13 +01:00
task.cc tpool - implement post-task callback (for Innodb debugging) 2020-01-12 19:08:02 +01:00
task_group.cc tpool - implement post-task callback (for Innodb debugging) 2020-01-12 19:08:02 +01:00
tpool.h MDEV-21326 : Address TSAN warnings in tpool. 2020-01-12 20:30:26 +01:00
tpool_generic.cc MDEV-21551 Fix calculation of current concurrency level in 2020-01-22 00:01:25 +01:00
tpool_structs.h MDEV-21326 : Address TSAN warnings in tpool. 2020-01-12 20:30:26 +01:00
tpool_win.cc tpool - implement post-task callback (for Innodb debugging) 2020-01-12 19:08:02 +01:00
wait_notification.cc tpool - misc fixes 2020-01-12 21:34:59 +01:00