# #4145 rh day DBs 15-26 Oct: root cause + options (dataeng, 27 Oct)
Root cause (not a data bug): /opt/hist/rh_rebuild.py pick() always takes the NEWEST incomplete day. Since 15 Oct one day's stage A (swaps6h of ~4-6k pools, 100-pool log batches at 4 threads) takes longer than 24 h, so every morning a new day arrives and preempts the unfinished one. Days 15-26 stopped after pools+launches (kv has no swaps6h/tapes/complete, swaps 5k-400k partial, bars 0). Log shows only "pools"/"launches" lines for them. Last full day = 14 Oct. Also one RPC error 25 Oct 11:19 (eth_getBlockByNumber None), self-recovered.
Peaks from runtrack: tokens/kline only hold ~4.6k runners (>=~$500k ath); covers 173 of 21,277 blank rows. Option (b) is NOT enough (fine only for runner rows; ath_mc column).
Options (ppdata owns rh_rebuild.py + its shared paid key, so I did not start a second worker):
 1. Change pick() to finish the oldest incomplete day first (or process days 15-26 oldest-first until caught up); stage A is resumable via kv marks. ~12 days x >24 h each at current rate: too slow alone.
 2. Cheaper: for the mcap peak only, swaps6h is enough for the first 6 h; skip tapes (transfers) for these days. Tapes is the slow part (10 threads, per-token logs). Add flag to skip stage tapes -> days complete in hours.
 3. Fill 15-26 Oct blanks from our own tapes (v4tape/chainlogs) if they hold v4 swaps: ask me and I build it.
Script used for the check: /opt/crew/work/dataeng/aipfill_rt.py
