[MDEV-28558] The MTR based test innodb_defrag_concurrent is not repeatable. Created: 2022-05-13  Updated: 2024-01-24  Resolved: 2024-01-24

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.6.8, 10.8.3
Fix Version/s: 11.1.0

Type: Bug Priority: Minor
Reporter: Matthias Leich Assignee: Matthias Leich
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5834 Merge Kakao Defragmentation implement... Closed
relates to MDEV-30544 Deprecate innodb_defragment and relat... Closed
relates to MDEV-30545 Remove innodb_defragment and related ... Closed

 Description   

Logging: ./mtr  --mem --repeat=2 innodb_defrag_concurrent
..
=================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
innodb.innodb_defrag_concurrent 'innodb' [ pass ]  29589
innodb.innodb_defrag_concurrent 'innodb' [ 2 fail ]
        Test ended at 2022-05-13 12:39:55
 
CURRENT_TEST: innodb.innodb_defrag_concurrent
--- /Server_bin/10.8_asan/mysql-test/suite/innodb/r/innodb_defrag_concurrent.result     2022-03-01 17:39:21.000000000 +0100
+++ /Server_bin/10.8_asan/mysql-test/suite/innodb/r/innodb_defrag_concurrent.reject     2022-05-13 12:39:54.905656077 +0200
@@ -46,7 +46,7 @@
 15800
 select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name  in ('n_pages_freed');
 count(stat_value) > 0
-0
+1
 select count(stat_value) > 0 from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name  in ('n_page_split');
 count(stat_value) > 0
 1
 
mysqltest: Result content mismatch
 
The reason for that is the following:
The creation of the table t1 leads to records like
select database_name, table_name, index_name, stat_name, stat_value, sample_size
from mysql.innodb_index_stats where table_name like '%t1%' and  stat_name  in ('n_page_split');
database_name	table_name	index_name	stat_name	stat_value	sample_size	
test	t1	PRIMARY	n_page_split	#	NULL	
test	t1	second	n_page_split	#	NULL
After some OPTIMIZE t1 we get some additional record
test	t1	FTS_DOC_ID_INDEX	n_page_split  #	NULL
 
And these records do not disappear if the table t1 gets dropped.
IMHO this is rather harmless as long as parts of the server
- do not use these values at all
or
- are aware that whatever statistics which is older than the create
  data of a table mentioned is no more valid.
 
The repetition of innodb_defrag_concurrent meets at its begin this
historic data of the previous execution and fails with result set difference.



 Comments   
Comment by Marko Mäkelä [ 2024-01-24 ]

I don’t think it makes sense to spend effort on this, given that this functionality was removed in MDEV-30545 and never was really useful.

Generated at Thu Feb 08 10:01:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.