Bug 2055182 - Run database maintenance after migration#3540
Open
badboy wants to merge 1 commit into
Open
Conversation
travis79
approved these changes
Jul 15, 2026
travis79
left a comment
Member
There was a problem hiding this comment.
I guess this would be hard to cover via a test 🤔, oh well, it isn't probably a likely failure point so it should be okay.
travis79
approved these changes
Jul 16, 2026
badboy
force-pushed
the
run-automatic-database-vacuum-/wpqqroyowzyo
branch
from
July 17, 2026 10:15
1ec3d23 to
bdbf277
Compare
Based on the same maintenance tasks appservices runs on the places DB
badboy
force-pushed
the
run-automatic-database-vacuum-/wpqqroyowzyo
branch
from
July 17, 2026 10:19
bdbf277 to
66f117d
Compare
badboy
commented
Jul 17, 2026
Comment on lines
+258
to
+262
| // Unvacuumed the database is _smaller_, because the migrated data is in the WAL file. | ||
| // It's around 20k bytes. | ||
| // Vacuumed & checkpointed the WAL transactions are merged into the database. | ||
| let vacuumed_database_size = 32768; | ||
| assert_eq!(db_file_size, vacuumed_database_size); |
Member
Author
There was a problem hiding this comment.
to be honest I don't like this test. It's way too fragile and will break if we add any other migration metrics.
Member
There was a problem hiding this comment.
🤔 Yeah, the 32768 here seems magically dangerous. What if you just check to see if it is bigger and didn't use the comparison to a magic/const/whatever? Just enough to show that the transactions have been applied to the database?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on the same maintenance tasks appservices runs on the places DB