After I pushed a follow-up to MDEV-4750 to 10.6 to no longer globally set innodb_stats_persistent=OFF in all tests, we got a test failure:
10.6 241e2ba642590e191359466911e7d24427f1993c
|
galera.galera_var_cluster_address 'innodb' w2 [ fail ]
|
Test ended at 2021-08-31 18:25:33
|
|
CURRENT_TEST: galera.galera_var_cluster_address
|
…
|
2021-08-31 18:25:15 148 [Note] WSREP: Server status change joiner -> joined
|
2021-08-31 18:25:15 148 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
|
2021-08-31 18:25:15 150 [Note] WSREP: Recovered cluster id d8111f9f-0a87-11ec-b553-db00c63c8236
|
2021-08-31 18:25:15 150 [ERROR] WSREP: Record locking is disabled in this thread, but the table being modified is not `mysql/wsrep_streaming_log`: `mysql/innodb_table_stats`.
|
2021-08-31 18:25:15 0x7fe093c1d700 InnoDB: Assertion failure in file /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.5/storage/innobase/row/row0ins.cc line 3199
|
The cause of this appears to be that on opening the table, innodb_stats_auto_recalc may kick in while Galera is not expecting this.
I was unable to reproduce this crash locally by running the following:
./mtr --no-reorder galera.galera_set_position_after_dummy_writeset galera.galera_sp_bf_abort galera.galera_sp_insert_parallel galera.galera_split_brain galera.galera_sql_log_bin_zero galera.galera_status_cluster galera.galera_status_local_index galera.galera_status_local_state galera.galera_strict_require_innodb galera.galera_strict_require_primary_key galera.galera_suspend_slave galera.galera_sync_wait_show galera.galera_toi_alter_auto_increment galera.galera_toi_ddl_locking galera.galera_toi_ddl_sequential galera.galera_toi_drop_database galera.galera_toi_ftwrl galera.galera_toi_lock_exclusive galera.galera_toi_lock_shared galera.galera_transaction_read_only galera.galera_transaction_replay galera.galera_truncate galera.galera_truncate_temporary galera.galera_unicode_identifiers galera.galera_unicode_pk galera.galera_update_limit galera.galera_var_OSU_method galera.galera_var_OSU_method2 galera.galera_var_auto_inc_control_off galera.galera_var_certify_nonPK_off galera.galera_var_cluster_address
|
After the test galera.galera_truncate, the execution of the tests would seem to hang.
As far as I can tell, the table wsrep_streaming_log along with streaming replication was introduced in Galera 4.
I would suggest the following change, and I think that it needs to be applied in 10.4 already.
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
|
index d7466ae5f8a..f15a25f2010 100644
|
--- a/storage/innobase/dict/dict0stats.cc
|
+++ b/storage/innobase/dict/dict0stats.cc
|
@@ -3585,6 +3585,11 @@ dict_stats_update(
|
}
|
|
if (dict_stats_auto_recalc_is_enabled(table)) {
|
+#ifdef WITH_WSREP
|
+ if (wsrep_thd_skip_locking(current_thd)) {
|
+ goto transient;
|
+ }
|
+#endif
|
return(dict_stats_update(
|
table,
|
DICT_STATS_RECALC_PERSISTENT));
|
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
|
index 6f228142cba..761b2adf9ba 100644
|
--- a/storage/innobase/row/row0ins.cc
|
+++ b/storage/innobase/row/row0ins.cc
|
@@ -3185,7 +3185,8 @@ row_ins_clust_index_entry(
|
|
#ifdef WITH_WSREP
|
const bool skip_locking
|
- = wsrep_thd_skip_locking(thr_get_trx(thr)->mysql_thd);
|
+ = thr_get_trx(thr)->is_wsrep()
|
+ && wsrep_thd_skip_locking(thr_get_trx(thr)->mysql_thd);
|
ulint flags = index->table->no_rollback() ? BTR_NO_ROLLBACK
|
: (index->table->is_temporary() || skip_locking)
|
? BTR_NO_LOCKING_FLAG : 0;
|
The second hunk is only there in order to avoid a function call overhead in a rather common scenario that one is running MariaDB Server without Galera replication.
- relates to
-
MDEV-4750
join_outer_innodb.test fails in 10.0-monty
-
-
Closed
{"report":{"fcp":859.1999999284744,"ttfb":286.7999999523163,"pageVisibility":"visible","entityId":102424,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"bcfb72c9-43c8-4168-9c1e-36e94daab4ea","navigationType":0,"readyForUser":931.5,"redirectCount":0,"resourceLoadedEnd":527.6999999284744,"resourceLoadedStart":294.09999990463257,"resourceTiming":[{"duration":57.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":294.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":294.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":351.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":57.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":294.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":294.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":352.1999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":120.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":294.59999990463257,"connectEnd":294.59999990463257,"connectStart":294.59999990463257,"domainLookupEnd":294.59999990463257,"domainLookupStart":294.59999990463257,"fetchStart":294.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":355.1999999284744,"responseEnd":415,"responseStart":371.6999999284744,"secureConnectionStart":294.59999990463257},{"duration":131.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":294.7999999523163,"connectEnd":294.7999999523163,"connectStart":294.7999999523163,"domainLookupEnd":294.7999999523163,"domainLookupStart":294.7999999523163,"fetchStart":294.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":355.6999999284744,"responseEnd":426.6999999284744,"responseStart":370.6999999284744,"secureConnectionStart":294.7999999523163},{"duration":96.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":295,"connectEnd":295,"connectStart":295,"domainLookupEnd":295,"domainLookupStart":295,"fetchStart":295,"redirectEnd":0,"redirectStart":0,"requestStart":357.5,"responseEnd":391.39999997615814,"responseStart":390.89999997615814,"secureConnectionStart":295},{"duration":96.80000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":295.09999990463257,"connectEnd":295.09999990463257,"connectStart":295.09999990463257,"domainLookupEnd":295.09999990463257,"domainLookupStart":295.09999990463257,"fetchStart":295.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":357.89999997615814,"responseEnd":391.89999997615814,"responseStart":391.39999997615814,"secureConnectionStart":295.09999990463257},{"duration":95.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":295.2999999523163,"connectEnd":295.2999999523163,"connectStart":295.2999999523163,"domainLookupEnd":295.2999999523163,"domainLookupStart":295.2999999523163,"fetchStart":295.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":359.2999999523163,"responseEnd":390.7999999523163,"responseStart":390.1999999284744,"secureConnectionStart":295.2999999523163},{"duration":62.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":295.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":295.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":358.1999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":107.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":295.59999990463257,"connectEnd":295.59999990463257,"connectStart":295.59999990463257,"domainLookupEnd":295.59999990463257,"domainLookupStart":295.59999990463257,"fetchStart":295.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":363.5,"responseEnd":403.2999999523163,"responseStart":402.89999997615814,"secureConnectionStart":295.59999990463257},{"duration":67.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":295.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":295.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":362.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":107,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":295.89999997615814,"connectEnd":295.89999997615814,"connectStart":295.89999997615814,"domainLookupEnd":295.89999997615814,"domainLookupStart":295.89999997615814,"fetchStart":295.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":365.5,"responseEnd":402.89999997615814,"responseStart":402.2999999523163,"secureConnectionStart":295.89999997615814},{"duration":193.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":331.1999999284744,"connectEnd":331.1999999284744,"connectStart":331.1999999284744,"domainLookupEnd":331.1999999284744,"domainLookupStart":331.1999999284744,"fetchStart":331.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":421,"responseEnd":524.3999999761581,"responseStart":521.7999999523163,"secureConnectionStart":331.1999999284744},{"duration":195,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":332.6999999284744,"connectEnd":332.6999999284744,"connectStart":332.6999999284744,"domainLookupEnd":332.6999999284744,"domainLookupStart":332.6999999284744,"fetchStart":332.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":465.09999990463257,"responseEnd":527.6999999284744,"responseStart":524.5999999046326,"secureConnectionStart":332.6999999284744},{"duration":194.39999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":608.1999999284744,"connectEnd":608.1999999284744,"connectStart":608.1999999284744,"domainLookupEnd":608.1999999284744,"domainLookupStart":608.1999999284744,"fetchStart":608.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":766.2999999523163,"responseEnd":802.5999999046326,"responseStart":801.8999999761581,"secureConnectionStart":608.1999999284744}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":114,"responseStart":286,"responseEnd":332,"domLoading":290,"domInteractive":987,"domContentLoadedEventStart":987,"domContentLoadedEventEnd":1032,"domComplete":1592,"loadEventStart":1592,"loadEventEnd":1592,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":970.5999999046326},{"name":"bigPipe.sidebar-id.end","time":971.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":971.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":972.3999999761581},{"name":"activityTabFullyLoaded","time":1045.1999999284744}],"measures":[],"correlationId":"3bb3325473905e","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":97,"dbReadsTimeInMs":13,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The fix has been merged with the main branch: https://github.com/MariaDB/server/commit/8bc254dd6285c3258971bc5501f2abc1a2eed19c