Some news:
I have reworked the cancellation part. It is now more reliable and no more hang.
I have fixed a bug in the db v2->v3 migration process.
Now all integrations tests are green. I will now start heavy testings: fixing thousand of files with the last mame version, switching from merged mode to unmerged mode etc...