Skip to content

JiHu guidelines for database migrations (unified schema approach)

Andreas Brandl requested to merge ab/jihu-db into master

Direct reading link: https://about.gitlab.com/handbook/ceo/chief-of-staff-team/jihu-support/jihu-database-change-process.html

Why is this change being made?

In order to facilitate upgrades between GitLab CE/EE editions and JiHu editions, we need to find a good strategy for database schema changes. There are two different proposals:

  1. Unified schema approach (this proposal): Upstream GitLab gets all JiHu database migrations, all editions have the same schema
  2. Separate schema approach (!90336 (closed)): Keep JiHu database migrations specific to JiHu, provide adjustments for edition changes from GitLab to JiHu

This describes the "keep the database schema the same across GitLab CE/EE and JiHu editions" approach.

Related issues:

Summary

We choose to keep the schema the same across Gitlab CE/EE and JiHu editions. The main reason is to support all possible upgrade paths between those editions without having to resolve conflicts between editions.

This is at the expense of adding JiHu specific database objects to GitLab. We provide a few mitigations to limit the database overhead coming from this for GitLab installations, in particular this is relevant for GitLab.com.

There is still going to be some level of operational overhead with this solution, in particular for GitLab.com. This is the prize we pay to allow for seamless upgrades between GitLab and JiHu editions with this approach.

Follow-up work

Author Checklist

  • Provided a concise title for the MR
  • Added a description to this MR explaining the reasons for the proposed change, per say-why-not-just-what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added.
  • Assign reviewers for this change to the correct DRI(s)
    • If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the "Maintained by" section in on the page being edited.
    • If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies.
  • If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR.
    • If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.

Edited by Andreas Brandl

Merge request reports