A live backfill must account for changes after its snapshot through a write pause, controlled dual write, or ordered change-stream replay. The prompt should ask which system owns writes, how updates and deletes are represented, what watermark marks a complete tail, and how lag is observed. A zero-lag screenshot is not a durable completion claim if more events can arrive. The cutover plan needs an explicit stable gate and divergence monitoring after traffic changes.
Make this comfortable
Backfill prompts: account for writes during migration
Operational case
Harbor leaves the legacy table as write owner during snapshot H-47. New order updates enter an ordered tail that the target replays after backfill, including changes to quarantined IDs. The operator records the last applied watermark and measured lag at the planned cutover window. A generated paragraph cannot attest that the live stream is caught up; the running system supplies that evidence.
Write owner: legacy table
Snapshot: H-47 | tail: ordered positions
Update/delete: stable order key + source version
Cutover gate: measured lag and replay watermarkPerformance and review cost
Applying T tail events is O(T) expected keyed work after O(N) snapshot processing. Stream ordering and deduplication may add cost. Controlled dual write can introduce partial-failure states, so any selected strategy needs a recovery path and observable lag receipt.
Common Mistakes
- Do not ignore post-snapshot updates.
- Do not give two systems write ownership without a conflict rule.
- Do not claim the tail is complete without a watermark.
Connected lessons
- Production prompt engineering
- Prompt Engineering
- Analytics prompts: reconcile identities, duplicates, and late arrivals
- Schema migration prompts: check old and new clients together
- Backfill prompts: pin source, target, and snapshot
- Backfill prompts: map known states and quarantine unknowns
- Backfill prompts: bound batches and make retries idempotent
- Backfill prompts: compare count and field-level parity
- Backfill prompts: hold cutover until fallback is rehearsed
- Project: review Harbor's order-status backfill
- Database backfill prompt decisions
prompt engineering
database migration
