Skip to content

table design_user_mentions miss unique index for (design_id, note_id) on jihulab.com

Summary

raise 500 error when comment with user mention on design

on jihulab.com:

image

log:

image

database:

image

compare with:

db/post_migrate/20230816152639_swap_design_user_mentions_note_id_to_big_int_for_self_managed.rb miss replace for design_user_mentions_on_design_id_and_note_id_unique_index index

Steps to reproduce

Example Project

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

since !134217 (merged) cleanup the note_id_convert_to_bigint column in table design_user_mentions, we need add back the design_user_mentions_on_design_id_and_note_id_unique_index index

Edited by Linjie Zhang