Skip to main content
Antoni Pelka
Antoni Pelka
AIStoriesAbout
ConnectOpens LinkedIn
AIStoriesAbout
Stories

Migrations that finish in an hour

APAntoni Pelka·Case study·November 2026·1 min read

  • Systems architecture
  • E-commerce / platforms
  • Customer experience
  • Data migrations
  • Delivery & Implementation

An activity-feed migration for ~30,000 users finished just over an hour, inside a window short enough to rehearse.

DAYS~1 HRBATCH + MAPS
On this page & related

On this page

  1. What moved
  2. The document
  3. The path
  4. The check

Related notes

  • Case study · October 2026Quotes in seconds: finding the right abstraction across multiple insurance providers
  • Case study · September 2026Delivery, from weeks to hours

What was asked

Move every activity-feed event into a new document shape, and keep the cutover inside a window the team can rehearse.

What changed

A per-event path, scaled from a sample to ~30,000 users, projected a few days. Batches of 500 and per-batch in-memory maps brought the forecast to just over an hour. The production run matched it.

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

Old document
  • Single image
  • A label
  • One subject: the other person
New document
  • 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.

Planning a migration that looks like it'll take days?

I'm Antoni Pelka, a Principal Software Engineer. I work on systems architecture and delivery, including migrations that have to finish inside a working window.

Talk through your migration path

On this page

  1. What moved
  2. The document
  3. The path
  4. The check

Related notes

  • Case study · October 2026Quotes in seconds: finding the right abstraction across multiple insurance providers
  • Case study · September 2026Delivery, from weeks to hours
Next noteQuotes in seconds: finding the right abstraction across multiple insurance providersCase study · October 2026
© 2026 Antoni Pelka. All rights reserved.

Certified by

AWS Certified Solutions Architect – Associate, AWS Certified AI Practitioner, AWS Certified Cloud Practitioner
linkedinxgithub