Every activity-feed event on a consumer social gifting and wishlist product had to move into a new document shape. The team needed to practice the run, then finish it while the product was in use.
What moved
Three kinds of event: lists followed, with owned follows and shared follows as one type; products added to a wishlist or list; gifts sent, and gifts received that were accepted.
The document
- Single image
- A label
- One subject: the other person
- Actor and subject. Which is which depends on the event type.
- Up to 3 unique images, from the list cover and the newest product images.
- List item count.
- Seen flag from the last activity-tab view.
- Event type names remapped.
- Grouped events keep the parent link.
The path
Per event, the job looked up the user, the list, and the images again. At this size, that repeated lookup is the run.
Each batch took 500 events, one batch after another. Users, lists, and images for that batch went into in-memory maps once, then the batch wrote. An event already in the new collection was skipped, so the job could run again. A deleted list became a hidden event. A missing user was skipped and counted.
The check
A unit test covered type mapping, the hidden-list case, and an idempotent rerun. Each batch logged migrated, skipped, and missing-user. Those counts are the reconciliation for the batch: what landed, what was already there, and what had no user.