[MDEV-12994] innodb_fast_shutdown=0 skips change buffer merge; fast shutdown does it Created: 2017-06-05  Updated: 2017-06-12  Resolved: 2017-06-05

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1.24
Fix Version/s: 10.1.25, 10.0.32, 10.2.7

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

Issue Links:
Problem/Incident
is caused by MDEV-12052 Shutdown crash presumably due to mast... Closed
Relates
relates to MDEV-13039 innodb_fast_shutdown=0 may fail to pu... Closed

 Description   

The fix for MDEV-12052 contained an error: a full change buffer merge is performed on a fast shutdown only, not on a slow shutdown.
The following fix should be applied to both InnoDB and XtraDB:

diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 93ed302a236..bad1579070c 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -2403,7 +2403,7 @@ DECLARE_THREAD(srv_master_thread)(
 	case SRV_SHUTDOWN_CLEANUP:
 		if (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP
 		    && srv_fast_shutdown < 2) {
-			srv_shutdown(srv_fast_shutdown == 1);
+			srv_shutdown(srv_fast_shutdown == 0);
 		}
 		srv_suspend_thread(slot);
 		my_thread_end();


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