DEV Community

Discussion on: How we use "ship small" to rapidly build new features at GitHub

Collapse
 
serhiiohorodnyk profile image
Serhii Ohorodnyk

Really good post! Thank you for your effort.
I have a question regarding feature flags in the backend. What if your new feature requires relatively big or significant database migrations. How does that impact the process? Do you maintain two data structures (old and new) till the feature is done?

Collapse
 
mscccc profile image
Mike Coutermarsh

That really depends on the migration + feature.

We can never take downtime at GitHub. So when making any DB change, it has to work with both the old and new code.

A recent example, we just had a feature that required us to move data to a new table. The process was like this.

  • Create the new table (no code changes)
  • Change writes to both the old and new table
  • Update the new feature to read from the new table (feature is behind a flag, so OK if data is incomplete)
  • Run backfill, transferring old data to the new table (slowly over a week)
  • Change old feature to read from the new table