Capricious verification errors

Because of the capricious verification errors that surfaced when I started syncing I tried what would happen with a database I do not sync.

I verified a 4 Gb database that has never been synced. It turned out to have a verification error (“Found 1 inconsistencies, 0 incorrect checksums, 0 missing and 0 orphaned files”). I repaired the database (“no more errors”), verified it again (“no errors found”), made some changes, verified again (“no errors found”), closed the database, opened it again, verified it and bingo (“Found 1 inconsistencies, 0 incorrect checksums, 0 missing and 0 orphaned files”)!

This behavior was reproducible and also occurred when I did not make any changes, just open, verify, repair, close.

After reproducing the error a number of times, I opened the database, verified that it had the same error, repaired the error, verified that it had no errors and chose ‘backup and optimize’. After 4 minutes the optimization was ready. I verified the database (“no errors found”), closed it, opened it again and there were no errors! Great!

I then made some changes, verified again (“no errors found”) closed it, opened it again, verified it and found again no errors.

So it seems that doing a ‘backup and optimize’ after repairing the error prevents its recurrence.

But it remains a bit mysterious. And I am curious how long it will take till the next verification error turns up.