Rebuilds
The Rebuilds page (/rebuilds, sidebar → Reliability) monitors long-running projection rebuild batches — rebuilds dispatched cell-by-cell under each database's concurrency cap by the rebuild-orchestration engine (#309). Where the Event Store Explorer's Operations tab rebuilds one shard directly, this page is for the batch-shaped jobs: a projection rebuilt across every store and tenant that hosts it, with per-cell tracking, retry, and cancel.
A cell is one unit of rebuild work — a (store, projection, tenant) combination. A single-store, single-tenant service produces a one-cell batch; a database-per-tenant service fans out one cell per tenant database, throttled per database.
The list
Two tables, live-updating:
- Active — batches currently running. Columns: Batch (short id — click to drill in), Service, Projection, Scope, Status, Progress (per-cell done / failed / cancelled counts behind a percentage bar), and Requested by.
- Recent — completed batches, newest first, same shape plus completion time.
Start rebuild
The Start rebuild button opens a modal that composes the batch:
| Field | Meaning |
|---|---|
| Service | The monitored service owning the projection (pre-filled from the global service selector) |
| Projection | The projection to rebuild, picked from the service's registered projections |
| Store scope | Default: every store hosting the projection; or narrow to one store |
| Tenant scope | Default (each store's default tenancy) · All tenants (one cell each) · Specific tenant |
Starting the batch shows a confirmation toast and the batch appears in Active immediately.
Batch detail
Route: /rebuilds/:batchId. Shows the batch header (status, service, projection, requested-by + requested/completed timestamps, aggregate progress bar with done · failed · cancelled · total counts) above the Cells table:
| Column | Meaning |
|---|---|
| Store | The store URI this cell rebuilds against (e.g. marten://main) |
| Projection / Tenant | The cell's projection and tenant (— for default tenancy) |
| Status | dispatched → running → done / failed / cancelled |
| Attempt | Retry counter — failed cells can be retried without restarting the batch |
| Node | The node executing the cell |
| Last error | The most recent failure message, when a cell has failed |
| Enqueued / Finished | Per-cell timestamps |
A status dropdown filters the cell list. Cancel batch (header) cancels every remaining cell; a per-cell Cancel action stops just that cell, and failed cells offer Retry. Refresh re-fetches on demand (the page also live-updates).
Two rebuild paths. The Operations-tab row/bulk Rebuild sends the direct
RebuildProjectioncommand to the service — quick, but untracked here. Rebuilds started from this page run through the orchestration engine and get batch/cell tracking, retry, and cancel. Prefer this page for anything multi-store, multi-tenant, or long enough that you'll want to watch it.
