Skip to content

Draft: Drop redundant verification columns from merge_request_diffs

What does this MR do and why?

This MR drops the redundant verification columns from merge_request_diffs

Verification state is now maintained in a separate table, merge_request_diff_details, so we don't need these columns in merge_request_diffs.

They were causing an error while checksumming mr diffs on primary. Some of the error trace from rails-background-jobs:

"error_message": "PG::AmbiguousColumn: ERROR:  column reference \"verified_at\" is ambiguous\nLINE 1: ...t_diff_details\".\"verification_state\" = 0 ORDER BY verified_a...\n                                                             ^\n",
    "error_class": "ActiveRecord::StatementInvalid",
    "error_backtrace":
    [
        "ee/lib/gitlab/geo/verification_state.rb:176:in `block in start_verification_batch'",
        "lib/gitlab/database.rb:266:in `block in transaction'",
        "lib/gitlab/database.rb:265:in `transaction'",
...

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Aakriti Gupta

Merge request reports