gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit765057fb765057fbMerge main into rv28c (LOG.md, STATUS.md: both sides kept)mre765057fb/tools/count-duplicate-ids.hl

943 B

  1. // tools/count-duplicate-ids.hl — mission 047 (hybriel#113): duplicate @ids per table. ONLY on a COPY (opening a table rewrites
  2. // its files): TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-duplicate-ids.hl
  3. import { MPackDB } from 'hl:mpackdb'
  4. import { env } from 'hl:proc'
  5. dir = env('TRACKER_STORAGE')
  6. for (t of ['episodes', 'follows', 'genres', 'persons', 'seasons', 'shows', 'users', 'watches']) {
  7. let idx = t == 'users' ? ['!identity'] : ['!oldId']
  8. let db = new MPackDB(file = dir + '/' + t + '.db', primaryKey = '@id', indexes = idx)
  9. let seen = {}
  10. let rows = 0
  11. let dupIds = 0
  12. let dupRows = 0
  13. for (r of db.find(null, null)) {
  14. rows = rows + 1
  15. let k = '' + r.id
  16. if (seen[k] == null) { seen[k] = 1 } else {
  17. if (seen[k] == 1) { dupIds = dupIds + 1 }
  18. seen[k] = seen[k] + 1
  19. dupRows = dupRows + 1
  20. }
  21. }
  22. print(t + ' rows=' + rows + ' duplicateIds=' + dupIds + ' extraRows=' + dupRows)
  23. }

Branches

Latest commits

  • 765057fbMerge main into rv28c (LOG.md, STATUS.md: both sides kept)mre
  • bf401884Tracker: RV28c startedmre
  • 0ff4ecd4Tracker: RV28c briefmre
  • 06565b1fRecords: day35 relay note, tickets subscription idmre
  • c6dc3e86RV28b: switch to set day35mre
  • 24e401b8Tracker: TR7 watch cleanmre
  • b0412957Tracker: RV28b handed overmre
  • 456940c8Tracker: RULINGS pathmre
  • b87a8fdcTracker: worldapi-conductor paths backmre
  • 641f3b54Tracker: Apollo answermre
  • 8b3cbddaTracker: status, TR7 fix livemre
  • ec30162aTracker: TR7 fix livemre
  • 54cbec80compose: ignore SIGPIPE (TR7 crash loop, exit 141)mre
  • 3e164b63Tracker: status after CL1mre
  • 9d686bb3Tracker: CL1 reviewedmre
  • b8bba562CL1: crash loop report (SIGPIPE confirmed, trap wrapper option)mre
  • 298785f2Tracker: CL1 startedmre
  • 36b22710Tracker: port slot, CL1 briefmre
  • a401190fTracker: GO for the crash loopmre
  • e195d372Tracker: token pathsmre