mariadb-server/storage
Yuchen Pei 284810b3e8
MDEV-30370 Fixing spider hang when server aborts
This is Kentoku's patch for MDEV-22979 (e6e41f04f4 + 22a0097727),
which fixes 30370.

It changes the wait to a timed wait for the first sts thread, which
waits on server start to execute the init queries for spider. It also
flips the flag init_command to false when the sts thread is being
freed. With these changes the sts thread can check the flag regularly
and abort the init_queries when it finds out the init_command is
false. This avoids the deadlock that causes the problem in MDEV-30370.

It also fixes MDEV-22979 for 10.4, but not 10.5. I have not tested
higher versions for MDEV-22979.

A test has also been done on MDEV-29904 to avoid regression, given
MDEV-27233 is a similar problem and its patch caused the
regression. The test passes for 10.4-11.0.

However, this adhoc test only works consistently when placed in the
main testsuite. We should not place spider tests in the main suite, so
we do not include it in this commit. A patch for MDEV-27912 should fix
this problem and allow a proper test for MDEV-29904. See comments in
the jira ticket MDEV-30370/29904 for the adhoc testcase used for this
commit.
2023-01-25 12:12:17 +11:00
..
archive Merge branch '10.3' into 10.4 2023-01-10 21:04:17 +01:00
blackhole Merge 10.3 into 10.4 2020-11-03 14:49:17 +02:00
cassandra Merge 10.3 into 10.4 2021-11-29 10:59:22 +02:00
connect Merge branch '10.3' into 10.4 2023-01-10 21:04:17 +01:00
csv Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
example Merge 10.3 into 10.4 2022-02-21 14:10:27 +03:00
federated MDEV-14907 FEDERATEDX doesn't respect DISTINCT 2022-01-05 16:52:39 +02:00
federatedx Merge branch '10.3' into 10.4 2022-10-26 14:55:47 +02:00
heap Merge branch '10.3' into 10.4 2022-07-27 11:02:57 +02:00
innobase Merge 10.3 into 10.4 2023-01-17 18:03:58 +02:00
maria Merge 10.3 into 10.4 2023-01-03 16:10:02 +02:00
mroonga Merge 10.3 into 10.4 2022-10-13 16:50:26 +03:00
myisam Merge 10.3 into 10.4 2023-01-03 16:10:02 +02:00
myisammrg Merge branch '10.3' into 10.4 2020-08-03 14:44:06 +02:00
oqgraph Merge 10.3 into 10.4 2021-11-29 10:59:22 +02:00
perfschema Merge 10.3 into 10.4 2023-01-13 09:28:25 +02:00
rocksdb Merge branch '10.3' into 10.4 2023-01-10 21:04:17 +01:00
sequence Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
sphinx Merge branch '10.3' into 10.4 2022-10-26 14:55:47 +02:00
spider MDEV-30370 Fixing spider hang when server aborts 2023-01-25 12:12:17 +11:00
test_sql_discovery MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
tokudb Merge branch '10.3' into 10.4 2023-01-10 21:04:17 +01:00