Closed Bug 1891141 Opened 8 months ago Closed 7 months ago

Make the page size for doing an Sqlite backup something that can be controlled via a pref / experiment

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Whiteboard: [fidefe-device-migration])

Attachments

(2 files)

In bug 1869060, I added support for cloning SQLite databases using the Online Backup API. Part of that involves copying certain pages of the database, then resting to yield to other requests, and then continuing the copy.

I used the same page value as was in the example, which was 5. That's defined statically here.

That value lets us trade between speed of the copy, and an amount of time we'd (presumably) block requests on the underlying database.

We should make it possible to tune this value.

Since the backup service is the only consumer of the SQLite backup method, is it okay for this page value to be a general preference accessed via StaticPrefs? Or would you prefer it be an optional argument that can be passed to backup?

Flags: needinfo?(mak)
Depends on: 1891146
Severity: -- → S3
Priority: -- → P3

This also fixes a bug in the test_connection_online_backup.js test which wasn't
properly evaluating that the page_size PRAGMA was being copied properly.

Assignee: nobody → mconley
Status: NEW → ASSIGNED

(In reply to Mike Conley (:mconley) (:⚙️) from comment #1)

Since the backup service is the only consumer of the SQLite backup method, is it okay for this page value to be a general preference accessed via StaticPrefs? Or would you prefer it be an optional argument that can be passed to backup?

I don't mind that much, I think an argument sounds fine.

Flags: needinfo?(mak)
Flags: needinfo?(mak)

replied there. Thanks.

Flags: needinfo?(mak)
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ccc7525869ae Add configuration parameters for pages per step and step delay to mozIStorageAsyncConnection.backupToFileAsync. r=mak https://hg.mozilla.org/integration/autoland/rev/790edb29878a Create preferences for the pages per step and step delay used by BackupResources. r=backup-reviewers,fchasen
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: