So my change so far is to move the storage bits required for the check to use backend.Backend with a bunch of namespacedkv’s, as I’ve seen a bunch of people complaining that it takes tons of ram.
For the return value I started off creating a CheckResult with a bunch of ints, that track counts of errors in each category.
This is nice, as the output is concise and I am not going to return 1000s of strings into the UI. Essentially if any of the counts are non-zero, you’re probably stuffed.
But I suspect that might suck for a more detailed debugging session.
The thing that came to my head is to add a new logger specific for this purpose, which would log the errors if they are found, but always return counts to the UI.
Do you think this is good enough?
I am also contemplating adding -reset-deltas (and perhaps even -reset-db) to the UI given how much frustration it caused in one of the threads recently by users not having to care how the application got started and not knowing how to invoke that. I suspect this would be in a form of “set env var, restart, check env var on startup, if set, do the action, unset env var and restart”. We need the db closed for this, so I can’t think of a way to do this other than by chaining restarts. Any concerns?