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
- 0f8d1fdclog: RV39 report, browser 387/2mre
- 64b8d1dclog: RV39 startedmre
- 1f2df72amission RV39mre
- 6c1936f9log+status: GC planmre
- 2846a840log: m569 result, GC hypothesismre
- b24cd2d5log: Anton on hl:fetch, mission 569mre
- 7d42cac1log+status: SL1 measured, fetch stalls remainmre
- 8e5f2ceflog: SL1 deployedmre
- 29f34212log: SL1 deploy startedmre
- 529dd741Merge sl1-slices: slice details repair and person fill (SL1)mre
- 8a83316blog: SL1 result, session drain slowermre
- 35e93e8dSL1: slice the details repair and person fill: catalog lists changed in place, 40 ms fill steps, people created in steps, writes one table per tickmre
- 72c9119flog+status: SL1 startedmre
- d74620fcmission SL1: slice repair and person fillmre
- 5d542d73log+status: ST1 resultmre
- 3945eb81ST1: stall diagnosis reportmre
- 404733aclog: ST1 startedmre
- 3e3d5a55mission ST1: stall diagnosismre
- 9c3180eblog+status: RV28d measured after deploymre
- fdf10b1alog: RV28d deployed on day38bmre