[MDEV-20389] The test innodb.innodb_bug84958 fails intermittently Created: 2019-08-19  Updated: 2019-08-20  Resolved: 2019-08-20

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.2.27, 10.3.18, 10.4.8

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: tests

Issue Links:
Problem/Incident
is caused by MDEV-20301 InnoDB's MVCC has O(N^2) behaviors Closed

 Description   

I observed the following test failure locally once:

CURRENT_TEST: innodb.innodb_bug84958
--- /mariadb/10.4/mysql-test/suite/innodb/r/innodb_bug84958.result	2019-08-16 10:06:47.837813454 +0300
+++ /mariadb/10.4/mysql-test/suite/innodb/r/innodb_bug84958.reject	2019-08-19 16:31:48.551841633 +0300
@@ -53,7 +53,7 @@
 SET @num_pages_2= num_pages_get();
 SELECT @num_pages_2 - @num_pages_1 < 500;
 @num_pages_2 - @num_pages_1 < 500
-1
+0
 #
 # Commit and show the final record.
 #
 
mysqltest: Result content mismatch

In my opinion, such SELECT expressions should be better replaced with something that reports a useful value on failure, like this:

SELECT IF(@num_pages_2 - @num_pages_1 < 500, 'OK', @num_pages_2 - @num_pages_1) num_pages_diff;

Please perform this change locally (or just remove the <500 in case the number is stable) and then repeat the test for many times locally.

You should also make sure that there is no other workload from previous tests that could cause innodb_buffer_pool_read_requests to be incremented. Either you should somehow force a rebootstrap, or you must ensure that the following have been performed:

  • complete change buffer merge
  • complete purge (including changes made by the test)

For the change buffer merge, it probably is easiest to do

SET GLOBAL innodb_fast_shutdown=0;
source include/restart_mysqld.inc

For ensuring the completion of purge, you should use wait_all_purged.inc, with the necessary preparation at the start of the test or immediately after server restart:

SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;

You should probably also ensure that no read-ahead is enabled.


Generated at Thu Feb 08 08:59:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.