MDEV-21117 has implemented correct binlog crash recovery in semisync replication. The server decides how to recover based on the role it has in the replication topology. In MDEV-21117 it deduces the role based on rpl_semi_sync_slave_enabled and rpl_semi_sync_master_enabled variables.
This leaves an important use case open. Typically not all slaves are semisync. If one has a mix of semysync and async slaves and the master crashes and after a failover wakes up as an async slave it won't have rpl_semi_sync_slave_enabled set and won't be able to recover correctly, because it won't be able to deduce its replication role.
We need to introduce the dedicated option that tells the server its initial¹ role in the replication topology. Perhaps the server can also automatically configure other settings, as appropriate for the specified role.
¹) initial — because the role can change dynamically, but such a change has no impact on crash recovery.
{"report":{"fcp":870.5,"ttfb":268.39999997615814,"pageVisibility":"visible","entityId":127931,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"f86e18ac-e93b-4907-b63b-15bc993fadcf","navigationType":0,"readyForUser":979.8999999761581,"redirectCount":0,"resourceLoadedEnd":584.6999999284744,"resourceLoadedStart":276.89999997615814,"resourceTiming":[{"duration":8,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":276.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":276.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":7.899999976158142,"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":277.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":277.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":285.1999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":187.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":277.5,"connectEnd":277.5,"connectStart":277.5,"domainLookupEnd":277.5,"domainLookupStart":277.5,"fetchStart":277.5,"redirectEnd":0,"redirectStart":0,"requestStart":285.89999997615814,"responseEnd":464.89999997615814,"responseStart":299.60000002384186,"secureConnectionStart":277.5},{"duration":306.59999990463257,"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":278.10000002384186,"connectEnd":278.10000002384186,"connectStart":278.10000002384186,"domainLookupEnd":278.10000002384186,"domainLookupStart":278.10000002384186,"fetchStart":278.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":286.39999997615814,"responseEnd":584.6999999284744,"responseStart":307.10000002384186,"secureConnectionStart":278.10000002384186},{"duration":46.299999952316284,"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":278.39999997615814,"connectEnd":278.39999997615814,"connectStart":278.39999997615814,"domainLookupEnd":278.39999997615814,"domainLookupStart":278.39999997615814,"fetchStart":278.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":289.60000002384186,"responseEnd":324.6999999284744,"responseStart":315.5,"secureConnectionStart":278.39999997615814},{"duration":35.60000002384186,"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":278.5,"connectEnd":278.5,"connectStart":278.5,"domainLookupEnd":278.5,"domainLookupStart":278.5,"fetchStart":278.5,"redirectEnd":0,"redirectStart":0,"requestStart":287.6999999284744,"responseEnd":314.10000002384186,"responseStart":311.7999999523163,"secureConnectionStart":278.5},{"duration":47.90000009536743,"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":278.6999999284744,"connectEnd":278.6999999284744,"connectStart":278.6999999284744,"domainLookupEnd":278.6999999284744,"domainLookupStart":278.6999999284744,"fetchStart":278.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":292.10000002384186,"responseEnd":326.60000002384186,"responseStart":316.2999999523163,"secureConnectionStart":278.6999999284744},{"duration":8.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":278.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":278.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":287.6999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":51.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":279.10000002384186,"connectEnd":279.10000002384186,"connectStart":279.10000002384186,"domainLookupEnd":279.10000002384186,"domainLookupStart":279.10000002384186,"fetchStart":279.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":294.89999997615814,"responseEnd":331,"responseStart":327,"secureConnectionStart":279.10000002384186},{"duration":10.800000071525574,"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":279.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":290,"responseStart":0,"secureConnectionStart":0},{"duration":52,"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":279.39999997615814,"connectEnd":279.39999997615814,"connectStart":279.39999997615814,"domainLookupEnd":279.39999997615814,"domainLookupStart":279.39999997615814,"fetchStart":279.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":295.10000002384186,"responseEnd":331.39999997615814,"responseStart":328.6999999284744,"secureConnectionStart":279.39999997615814},{"duration":269.89999997615814,"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":283.60000002384186,"connectEnd":283.60000002384186,"connectStart":283.60000002384186,"domainLookupEnd":283.60000002384186,"domainLookupStart":283.60000002384186,"fetchStart":283.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":329.60000002384186,"responseEnd":553.5,"responseStart":551.2999999523163,"secureConnectionStart":283.60000002384186},{"duration":270.10000002384186,"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":283.6999999284744,"connectEnd":283.6999999284744,"connectStart":283.6999999284744,"domainLookupEnd":283.6999999284744,"domainLookupStart":283.6999999284744,"fetchStart":283.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":329.89999997615814,"responseEnd":553.7999999523163,"responseStart":552.1999999284744,"secureConnectionStart":283.6999999284744},{"duration":113.80000007152557,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":621.6999999284744,"connectEnd":621.6999999284744,"connectStart":621.6999999284744,"domainLookupEnd":621.6999999284744,"domainLookupStart":621.6999999284744,"fetchStart":621.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":694.7999999523163,"responseEnd":735.5,"responseStart":734.5,"secureConnectionStart":621.6999999284744}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":71,"responseStart":268,"responseEnd":282,"domLoading":272,"domInteractive":1043,"domContentLoadedEventStart":1043,"domContentLoadedEventEnd":1091,"domComplete":1440,"loadEventStart":1440,"loadEventEnd":1440,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1015.5},{"name":"bigPipe.sidebar-id.end","time":1016.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1016.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1018.3999999761581},{"name":"activityTabFullyLoaded","time":1114.3999999761581}],"measures":[],"correlationId":"6f7ee1054dd1a1","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":113,"dbReadsTimeInMs":15,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
there is already such an option, init-rpl-role. It can be empty, MASTER, or SLAVE. Let's reuse it and enable slave-side recovery on --init-rpl-role=SLAVE