Skip to content
Commit 9a73b634 authored by Sean McGivern's avatar Sean McGivern 🔴
Browse files

Add table for files in merge request diffs

This adds an ID-less table containing one row per file, per merge request
diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised
currently, with the advantage that we can easily query the attributes of this
new table.

It does not migrate existing data, so we have fallback code when the legacy
st_diffs column is present instead. For a merge request diff to be valid, it
should have at most one of:

* Rows in this new table, with the correct merge_request_diff_id.
* A non-NULL st_diffs column.

It may have neither, if the diff is empty.
parent 352a9ed5
Loading
Loading
Loading
Loading
  • @smcgivern I think this is causing a 500 error creating merge requests on our instance since the 9.4.0 upgrade - details here: https://support.gitlab.com/hc/en-us/requests/80519

  • Author Contributor

    @jogux is it possible for you to share the diff (privately, if needed)?

    Both the old and the new method inserted into a Postgres text field, so I don't believe this will have directly caused this issue, but we can check.

  • @smcgivern Sure - but I don't know how to share it privately! I've put a link to a zip of the git format-patch output onto the support ticket, can you see it there?

    I am very prepared to believe that our user has managed to do something strange, but I can't currently see what!

    Edited by Joseph Heenan
  • Sean McGivern 🔴 @smcgivern

    mentioned in issue #35539 (closed)

    ·

    mentioned in issue #35539 (closed)

    Toggle commit list
  • Author Contributor

    @jogux thanks, that was very helpful! I've created https://gitlab.com/gitlab-org/gitlab-ce/issues/35539 and I'm trying to write a minimal test case now.

  • Awesome, thank you @smcgivern!

  • Author Contributor

    /done

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment