Alter ci_finished_builds CH table engine

What does this MR do and why?

Alter ci_finished_builds CH table engine

This migration updates the ci_finished_builds table engine from ReplacingMergeTree to ReplacingMergeTree(version, deleted)

References

#580441 (comment 2959651447)

How to set up and validate locally

To setup clickhouse: https://docs.gitlab.com/development/database/clickhouse/clickhouse_within_gitlab/

  • Run migration up:
bundle exec rake gitlab:clickhouse:migrate
  • open clickhouse console:
gdk clickhouse
  • Run this in clickhouse console and verify whether the table engine has changed to ReplacingMergeTree(version, deleted).
USE gitlab_clickhouse_development;

SHOW CREATE TABLE ci_finished_builds;
  • Run migration down:
bundle exec rake gitlab:clickhouse:rollback:main STEP=1
  • Run this again in clichouse console and verify whether the table engine has changed back to ReplacingMergeTree.
SHOW CREATE TABLE ci_finished_builds;

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading