Skip to content

Geo: Extract wiki replication and verification data in its own table

Summary

In the current implementation, we have the following to track projects and wikis replication and verification:

  1. We have 1 row in the project_repository_state table in the main database to track project and wiki verification
  2. We have 1 row in the project_registry table in the tracking database to handle project and wiki replication and synchronization.

As part of &4623 (closed), we need to separate projects and wikis in their tables.

Proposal

  1. Extract wiki replication and verification data in its own table:

    1. Create the table wiki_repository_state to track the verification state for wiki repositories;
    2. Make the legacy code responsible to verify wikis to maintain both wiki tables project_repository_state and wiki_repository_state simultaneously until %16.0 behind a feature flag geo_project_wikis_ssf_migration;
    3. Create the registry table wiki_repository_registry to track replication and verification state for wiki repositories;
    4. Make the legacy code responsible for replicating/verifying wikis to maintain both wiki tables project_registry and wiki_repository_registry simultaneously until %16.0 behind a feature flag geo_project_wikis_ssf_migration;
    5. Change the metrics gathering implementation to support both tables behind a feature flag geo_project_wikis_ssf_migration;
    6. Enable the geo_project_wikis_ssf_migration feature flag;
  2. Migrate wikis replication/verification to use SSF

    1. Make the SSF code responsible to verify wikis to maintain both wiki tables project_repository_state and wiki_repository_state simultaneously until %16.0 behind a feature flag geo_project_wikis_ssf_migration;
    2. Make the SSF code responsible for replicating/verifying wikis to maintain both wiki tables project_registry and wiki_repository_registry simultaneously until %16.0 behind a feature flag geo_project_wikis_ssf_migration;
  3. Migrate projects replication/verification to use SSF

  4. Warning about updating to %16.0 if there is any remaining unmigrated data

    1. Create a rake task to check if there is any remaining unmigrated data;
    2. Create a rake task to migrate any remaining unmigrated data;
    3. Update the version-specific upgrade docs, to tell customers to check if there is any remaining unmigrated data or run the rake task to migrate the data, otherwise, unmigrated wikis will be resynced after upgrade to version %16.0;
  5. Remove projects and wikis migration code in %16.1

    1. Remove the feature flag geo_project_wikis_ssf_migration;
    2. Remove wiki columns in the project_repository_state table;
    3. Remove wiki columns in the project_registry table;
    4. Remove the legacy code responsible for replicating/verifying project and wiki repositories;
Edited by Douglas Barbosa Alexandre