Pulled out of issue 597785 which is adding SQLite corruption-recovery code.
bool ShortcutsDatabase::Init() ends with:
return db_.Open(database_path_) && EnsureTable();
but the caller ShortcutsBackend::InitInternal() ignores the return value. AFAICT, there's no reason to believe this is returning false, but my experience is that there are probably a percent or so of users who are returning false, here, for cases which will never resolve themselves.
I propose adding a bit of instrumentation to verify that there are not large-scale problems like a bad schema transition, and if the numbers look low enough cause this case to Raze() the database, perhaps with a timeout (Raze if the lastmod time is >N).
When I have done this to other databases, the result was one or three large buckets corresponding to subtle issues which were reasonable to fix, plus a long tail of ??? which were reasonable to Raze().
Comment 1 by mpear...@chromium.org
, Apr 13 2016