fix: use write transaction in SpkiHashStore.cleanup()#8135
Conversation
query_map_vec() uses read-only connection, so it cannot be used to delete rows.
|
I think we need to make housekeeping stop ignoring errors at some point. There is only one test failing if we do this, it is testing housekeeping on closed database 2a39dc0 (#2255). I looked at the PR and it seems the test was introduced when housekeeping was mostly enumerating used files, and now because of the test we ignore all sort of SQL errors that are better not ignored. |
iequidoo
left a comment
There was a problem hiding this comment.
Not ignoring errors makes sense if next steps depend on the current one, otherwise debug assertions look better to me. If an error occurs in the release configuration, it will be an untested condition anyway because a part of the code has already run and caused side effects, skipping the remaining steps won't be safer probably
Debug assertion would also be fine. I cannot add it into this PR as well because then housekeeping test will fail with panic. |
query_map_vec() uses read-only connection,
so it cannot be used to delete rows.
Follow-up to #8086