Rebuilding The View

An engineer rebuilds a customer projection from event zero after a schema change. The same handler that writes projection rows also calls the notification service, so 40,000 customers receive a duplicate welcome email during the rebuild. What is the structural fix?

A

Record the sent-email timestamp on the projection row and have the handler skip any customer that already carries one, so a rebuild re-sends nothing

B

Projection handlers should only build state from events; external effects belong to a separate subscriber that keeps its own checkpoint and is never replayed from zero

C

Guard the send with a global flag that operators toggle before and after each rebuild, which is adequate because rebuilds are rare, planned, and run by hand

D

Make the notification service idempotent on a deduplication key, since a replay legitimately re-emits every effect the system ever produced and the key absorbs the repeats