Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.8
Description
MDEV-13498 fixed a bug that DELETE with CASCADE was very slow due to a Galera-related check even when Galera was not enabled.
After that fix, the operation is still slow when Galera is enabled.
When I notified seppo about MDEV-13498, on August 17 he mentioned that the purpose of this condition is to avoid evaluating a potentially expensive condition. Now it seems that evaluating this filtering condition may cost more than the cost of evaluating the supposedly-expensive condition.
I suggested the use of a lossy filter that would use a much simpler and faster data structure and algorithm than the std::find() on the std::deque, something like a hash table. This lossy filter would be allowed to fail safely, causing unnecessary evaluation of the supposedly-expensive condition.
Attachments
Issue Links
- is blocked by
-
MDEV-13498 DELETE with CASCADE constraints takes long time and then crashes the instance with Signal 6
-
- Closed
-
- relates to
-
MDEV-15611 Due to the failure of foreign key detection, Galera slave node killed himself.
-
- Closed
-
After a fix with test case provided on
MDEV-13498:jan@jan-laptop-asus:~/mysql/10.2/mysql-test$ ./mtr --vardir=/dev/shm galera_fk_big innodb_fk_big
Logging: ./mtr --vardir=/dev/shm galera_fk_big innodb_fk_big
vardir: /dev/shm
Checking leftover processes...
- found old pid 15383 in 'mysqld.2.pid', killing it...
process did not exist!
Removing old var directory...
couldn't chmod(0777, /dev/shm): Operation not permitted at /usr/share/perl/5.24/File/Find.pm line 511.
Couldn't remove directory '/dev/shm': Permission denied at /usr/share/perl/5.24/File/Find.pm line 511.
Creating var directory '/dev/shm'...
Checking supported features...
MariaDB Version 10.2.9-MariaDB
- SSL connections supported
Collecting tests...
Installing system database...
==============================================================================
TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
galera.galera_fk_big 'innodb' [ pass ] 48717
innodb.innodb_fk_big 'innodb' [ pass ] 35732
--------------------------------------------------------------------------
The servers were restarted 1 times
Spent 84.449 of 124 seconds executing testcases
Completed: All 2 tests were successful.