erp5: restore ZODB using the --with-verify option of "repozo --recover"
"repozo --verify" is not working as this code expects it to: it simply prints errors in stdout, and doesn't return an error code in case of error. Thus, running it had absolutely no effect, except wasting IO and CPU time. This commit introduces the use of "repozo --recover --with-verify", which runs the verify and the recover in a same step, and has the advantage to raise (it doesn't exit with 0) in case of error. Also, as it does the verification and the recovery at the same time, it uses half the IO for the read. On a production server using SSDs, with a ZODB of 1Tb, runner-import-restore now takes 14h instead of 26h, iow a performance increase of 46%.
Showing
-
Owner
"repozo --verify" is not working as this code expects it to: it simply prints errors in stdout, and doesn't return an error code in case of error.
for reference we fixed this in https://github.com/zopefoundation/ZODB/pull/396 but it's anyway much better to use
--recover --with-verify
and do only one pass.( I'm even wondering why
--with-verify
isn't the default in repozo )
Please register or sign in to comment