gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit593a6350593a6350boot: resumable start-up scan, the server listens first (T17)mre593a6350/tests/realdata-071.sh

2.4 KB

  1. #!/bin/bash
  2. # realdata-071.sh <jobs|fresh|stop> <new|old> <port> — mission 071 (Hybriel re-vendor, old 8590df63 vs new), NOT the gate.
  3. # Works on .scratch/w071/real-<which>/ (a COPY of live storage/, see STATUS "How to repeat"); old runs from .scratch/w071/oldtree
  4. # (this tree with .scratch/pre-070 bin/plugins and a .env link).
  5. # jobs: all jobs on, the daily run forced NOW as a delta (sync-state.txt = yesterday) → server-jobs.log, rss-jobs.log
  6. # fresh: a process on the done copy, TRACKER_SYNC=0 → server-fresh.log, rss-fresh.log; prints the boot RSS 60 s after listening
  7. # stop: kills the server by its PID (server.pid)
  8. # Both start modes write a session for the creator (az5b2 = user 0mujqspn0aqb) → real-<which>/sid.
  9. W=/media/STORAGE/projects/WorldAPI/tracker.worldapi.org; mode=$1; which=$2; port=$3
  10. R=$W/.scratch/w071/real-$which; tree=$W; [ "$which" = old ] && tree=$W/.scratch/w071/oldtree
  11. if [ "$mode" = stop ]; then pid=$(cat $R/server.pid); kill $pid; while kill -0 $pid 2>/dev/null; do sleep 1; done; echo "stopped $pid"; exit 0; fi
  12. mkdir -p $R/sessions
  13. sid=$(head -c 16 /dev/urandom | xxd -p); now=$(date +%s%3N)
  14. echo "{\"created\":$now,\"data\":{\"tag\":\"t\"},\"id\":\"$sid\",\"seen\":$now,\"user\":{\"id\":\"0mujqspn0aqb\"}}" > $R/sessions/$(printf %s "$sid" | sha256sum | cut -d' ' -f1)
  15. echo $sid > $R/sid
  16. cd $tree
  17. if [ "$mode" = jobs ]; then
  18. date -u -d yesterday +%F > $R/storage/mpackdb/sync-state.txt
  19. set -- TRACKER_SYNC=1 TRACKER_SYNC_HOUR=$(date -u +%-H)
  20. else
  21. set -- TRACKER_SYNC=0
  22. fi
  23. env "$@" TRACKER_PORT=$port TRACKER_URL=http://127.0.0.1:$port HL_HOST=127.0.0.1 TRACKER_WATCH=0 \
  24. TRACKER_STORAGE=$R/storage/mpackdb TRACKER_SESSIONS=$R/sessions/ TRACKER_OLD_SHORT_IDS=$tree/data/old-short-ids.json \
  25. setsid ./bin/hybriel project.hl > $R/server-$mode.log 2>&1 < /dev/null &
  26. pid=$!; echo $pid > $R/server.pid
  27. # RSS every 10 s ("<s since start> <time> <kB>") until the process ends
  28. ( t0=$(date +%s); while kill -0 $pid 2>/dev/null; do echo "$(( $(date +%s) - t0 )) $(date +%T) $(awk '/VmRSS/{print $2}' /proc/$pid/status 2>/dev/null)" >> $R/rss-$mode.log; sleep 10; done ) > /dev/null 2>&1 < /dev/null &
  29. t0=$(date +%s)
  30. until curl -s -o /dev/null http://127.0.0.1:$port/; do sleep 1; kill -0 $pid 2>/dev/null || { echo "server died"; tail -20 $R/server-$mode.log; exit 1; }; done
  31. echo "$which $mode pid $pid listening after $(( $(date +%s) - t0 )) s"
  32. if [ "$mode" = fresh ]; then sleep 60; echo "boot RSS (60 s after listening): $(awk '/VmRSS/{printf "%.0f", $2/1024}' /proc/$pid/status) MB"; fi

Branches

Latest commits

  • 593a6350boot: resumable start-up scan, the server listens first (T17)mre
  • be4890a0reports: H2 hydration audit (no test change needed)mre
  • 1f9c8bf4re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • c1df88eddocker-compose: HL_GC_TABLE_LOAD=62 (tracker mission 048, T16 real-data numbers)mre
  • d0a82867mission 048: report, LOG (HL_GC_TABLE_LOAD=62 measured)mre
  • 2d4be66fre-vendor Hybriel 5df4eb7e (GC: HL_GC_TABLE_LOAD knob, mission 406)mre
  • 99e7c8b9tests: realdata-m035-radii, repro-t38, realdata-060-backfill ports from env (REAL_PORT, REAL_CHROME, REPRO_CHROME), defaults unchangedmre
  • 4625aa22re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • a6dfd6ecdeploy: person-lookup gate (tracker#46)mre
  • 33ad4bd5Merge commit 'f57f64f'mre
  • 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
  • f57f64f0mission 046: report, LOGmre
  • 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • efe1b485mission 046: re-vendor Hybriel master 60b2817b (integration 8, #203): plugins mpackdb + web (bin/ git-ignored: hybriel, libhlrt.a, hlc.o, hlrt/ from native/zig-out)mre
  • 53099ffbmission 046: person page reads a slim per-title credit row cache (no whole-record fetch per credit); gate tests/person-lookup.mjsmre
  • 9b3828aemission 046a: report, LOGmre
  • 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
  • e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre