Add tests for vacuuming
Categories
(Core :: Storage: IndexedDB, task, P3)
Tracking
()
People
(Reporter: jstutte, Assigned: hsingh)
References
Details
We currently have no test that explicitly checks our vacuuming logic. We should have one (and preferably run it also in PBM).
| Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
Note that mozStorage does have some tests that :mak recently modernized/updated at https://searchfox.org/mozilla-central/source/storage/test/unit/test_vacuum.js although the situation is obviously a bit more complex for IDB.
One thing I was thinking was that we could potentially have telemetry for our IDB idle vacuuming and check the (local) telemetry as part of the test. I think at a high level the telemetry we'd want would be:
- How often are we doing the vacuuming? A histogram on number of vacuums performed.
- How many pages are we reclaiming for each high level vacuuming? A histogram on the number of pages vacuumed in total for a given database in a "session" of vacuuming. Specifically, since we take many small "bites" of the problem, we don't want to be tracking those small bites, but the total from those bites.
- How often are our vacuums interrupted before completing / how many pages did we vacuum before we were interrupted? It might make sense to structure the prior histogram and this histogram as twins. We use the former histogram if we're able to fully complete the vacuuming, and we use this histogram if we didn't complete the vacuuming before being interrupted.
- How long is the vacuuming taking? I think we might want 2 histograms here: 1) the time each bite takes, 2) the total time for the session (all bites for that DB for that runnable).
Comment 2•9 months ago
|
||
Adding a see-also on bug 1979997 where there was some weird corruption of the IDB database where the best explanation other than a very weird inconsistent filesystems state due to a crash (although one could still be involved) is maybe weird stuff relating to VACUUMs gone wrong.
Description
•