Skip to content

prerender-v0.93.0 — @harperfast/prerender

Choose a tag to compare

@harper-joseph harper-joseph released this 28 Sep 15:43
· 110 commits to main since this release
167d4ed

The render queue is now an in-memory queue keeper, with RenderSchedule as its durable side (#219, #215). The nextRenderTime index and everything built around it are removed: the claim floor, the ready sweep and the capped backlog walk.

Behaviour

  • Worker 0 holds every schedule row this node owns. It loads them by primary key, keeps them current from a table subscription, and publishes the ready set every second. It never reloads once live: config and membership changes reclassify in memory, and a lost subscription is reopened and walked.
  • Claims take from the ready set, re-read each row, and lease it with an exclusive grant, with no mutex. A key whose leases keep expiring with no result is held back (2, 4, 8… leases, capped at its cadence) rather than granted again.
  • A new queue status, unready, is reported while the keeper is not serving. Deployed renderers read it as empty.

API

  • New GET /prerender_admin/queue-state (node-local).
  • overview.claimFloor is replaced by overview.leases, and explain and schedule drop claimFloor / belowClaimFloor.
  • Removed: the reset-claim-floor action and the cap on POST /prerender_admin/backlog.

Config removed
queue.claimFloor.*, queue.claimScanCap, queue.ready.enabled, queue.ready.sweepInterval, queue.ready.sweepCap. A removed key that is still set only logs a warning.

Config added
queue.keeper.{publishInterval, verifyInterval, stateInterval}.

Metrics

  • Removed queue_health series: claim_scan_ms, ready_sweep_ms, ready_published, ready_cadence, below_floor, below_floor_age_ms, floor_pin_age_ms.
  • Added: keeper_load_ms, keeper_publish_ms, keeper_verify_ms, keeper_repaired, keeper_live, claim_stale, claim_wedged.

Deploying

  • Upgrade in place, with no data migration. A cluster running both versions is safe, so a node at a time works.
  • A rollback takes two restarts per node. 0.92.0 re-adds the index, and on a multi-thread node harper-pro#681 can leave some threads failing claims with "nextRenderTime" is not indexed yet after the rebuild. Restart once more once the rebuild finishes.
  • Console 0.17.0 keeps working, but its floor and sweep panels read — until the console catch-up.