tracker
All repositories: gitoria
943 B
// tools/count-duplicate-ids.hl — mission 047 (hybriel#113): duplicate @ids per table. ONLY on a COPY (opening a table rewrites// its files): TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-duplicate-ids.hlimport { MPackDB } from 'hl:mpackdb'import { env } from 'hl:proc'dir = env('TRACKER_STORAGE')for (t of ['episodes', 'follows', 'genres', 'persons', 'seasons', 'shows', 'users', 'watches']) {let idx = t == 'users' ? ['!identity'] : ['!oldId']let db = new MPackDB(file = dir + '/' + t + '.db', primaryKey = '@id', indexes = idx)let seen = {}let rows = 0let dupIds = 0let dupRows = 0for (r of db.find(null, null)) {rows = rows + 1let k = '' + r.idif (seen[k] == null) { seen[k] = 1 } else {if (seen[k] == 1) { dupIds = dupIds + 1 }seen[k] = seen[k] + 1dupRows = dupRows + 1}}print(t + ' rows=' + rows + ' duplicateIds=' + dupIds + ' extraRows=' + dupRows)}
Branches
Latest commits
- 2f790465mission HM1: heap object breakdownmre
- a18957falog: evening re-measure after CBmre
- aac9a98dlog: evening re-measure startmre
- 45163bd4log: person/tmdb error hypothesismre
- cb38de2blog: swap 503 causemre
- fd10c3d5log: CB livemre
- 7557c025log: CB deploy try 2mre
- 06a7534aMerge branch 'cb'mre
- 2f8030d6log: CB gates greenmre
- 498bf644log: CB gates startmre
- f59c2847gc1: bound the five request caches (shows.hl cacheLimit)mre
- 6ea2c6d6log: morning re-measure 11-04mre
- 446290f0log: GC1 livemre
- 8e6aa91dlog: GC1 deploy retrymre
- 87ad2dc1log: GC1 deployingmre
- 53f10fb8Merge branch 'gc1-deploy'mre
- 7fcbf1d2log: GC1 deploy GOmre
- 1fb6664bcompose: TRACKER_QSTATS=1 (GC1 measurement)mre
- 6576c1cdgc1: release the people-view scan lists once the view is builtmre
- 94f8a373gc1: back out the kept episode-id set (no measurable gain on /my/unwatched: 4.69 -> 4.61 GB per 150 loads)mre