I got a voice call interrupt - but I'll leave this here anyway
The metadata.opf files are written in a separate background thread…known as 'lazy writes'. Last time I looked it they were written at intervals of about 2 secs. If calibre is closed whilst there are outstanding metadata.opf writes the process will continue next time calibre is started.
@
abrogard - the
Library maintenance->Library metadata backup status action will report how many are outstanding.
The
calibredb backup_metadata command can be used to flush outstanding lazy-writes of metadata.opf files. I include it in my daily backup process.

Library closed plugin to flush any outstanding lazy writes of metadata.opf files for all known libraries.
BR