Bug #109922 SEs do not coordinate clone rollbacks on instance startup
Submitted: 3 Feb 2023 14:15 Modified: 22 Oct 8:25
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S4 (Feature request)
Version:8.0.32 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[3 Feb 2023 14:15] Laurynas Biveinis
Description:
If InnoDB clone decides to rollback during its startup, other storage engines will not be aware of this and will proceed as usual, resulting in inconsistent instance between storage engines.

How to repeat:
Implement another clone-supporting storage engine, then run the InnoDB clone MTR tests with it enabled

Suggested fix:
Ideally this should be fixed through a 2PC-like design where all the SEs vote to rollback the clone or to continue during the startup. But, a simpler case is where only InnoDB can roll back the clone and it also happens to run the first during instance startup. Then, i.e. make InnoDB write a special marker file if it decides to rollback on clone startup, whose presence may be checked by other SEs when they initialize later.
[3 Feb 2023 14:17] Laurynas Biveinis
Bug 109922 partial fix

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug109922-poc.patch (application/octet-stream, text), 2.12 KiB.

[6 Feb 2023 4:56] MySQL Verification Team
Hello Laurynas,

Thank you for the feature request and contribution!

regards,
Umesh
[9 Jul 12:59] Laurynas Biveinis
My contributed patch applies cleanly on 9.0.0 and passes the tests.
[22 Oct 8:25] Laurynas Biveinis
The contributed patch applies on 9.1.0 cleanly and passes the tests.