genhistorydb

command
v2.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: GPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command genhistorydb builds a user.db full of legacy MediaHistory rows (no identity snapshot, policy version 0) for stress-testing the media history identity backfill sweep on real hardware. Rows are written through the production userdb code path so the schema and row shape are exactly what a device that recorded history before the identity upgrade holds.

Point -mediadb at a copy of the target device's media.db to make a fraction of rows resolvable against its real index (exercising identity construction, row updates, and re-sync marking); the rest use fabricated paths that can never resolve (exercising the skip path). Copy the result over the device's user.db (service stopped, original backed up) and watch the sweep.

Usage:

go run ./scripts/genhistorydb -out ./tmp/stress -rows 50000 \
  [-mediadb ./tmp/media.db] [-resolvable 0.7] [-nouuid 0.1] [-span-days 365]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL