1. 06 3月, 2018 1 次提交
  2. 01 3月, 2018 1 次提交
  3. 12 2月, 2018 1 次提交
  4. 07 2月, 2018 2 次提交
  5. 02 2月, 2018 2 次提交
  6. 26 1月, 2018 3 次提交
  7. 17 1月, 2018 1 次提交
  8. 11 1月, 2018 1 次提交
    • J
      Denormalize commits count for merge request diffs · e6a1db6d
      Jan Provaznik 提交于
      For each MR diff an extra 'SELECT COUNT()' is executed
      to get number of commits for the diff. Overall time to get counts for
      all MR diffs may be quite expensive. To speed up loading of MR info,
      information about number of commits is stored in a MR diff's extra column.
      
      Closes #38068
      e6a1db6d
  9. 09 1月, 2018 1 次提交
  10. 05 1月, 2018 4 次提交
  11. 04 1月, 2018 2 次提交
  12. 25 12月, 2017 1 次提交
  13. 22 12月, 2017 1 次提交
  14. 29 11月, 2017 1 次提交
    • S
      Remove serialised diff and commit columns · 4ebbfe5d
      Sean McGivern 提交于
      The st_commits and st_diffs columns on merge_request_diffs historically held the
      YAML-serialised data for a merge request diff, in a variety of formats.
      
      Since 9.5, these have been migrated in the background to two new tables:
      merge_request_diff_commits and merge_request_diff_files. That has the advantage
      that we can actually query the data (for instance, to find out how many commits
      we've stored), and that it can't be in a variety of formats, but must match the
      new schema.
      
      This is the final step of that journey, where we drop those columns and remove
      all references to them. This is a breaking change to the importer, because we
      can no longer import diffs created in the old format, and we cannot guarantee
      the export will be in the new format unless it was generated after this commit.
      4ebbfe5d
  15. 24 11月, 2017 1 次提交
  16. 23 11月, 2017 1 次提交
    • S
      Use latest_merge_request_diff association · 991bf24e
      Sean McGivern 提交于
      Compared to the merge_request_diff association:
      
      1. It's simpler to query. The query uses a foreign key to the
         merge_request_diffs table, so no ordering is necessary.
      2. It's faster for preloading. The merge_request_diff association has to load
         every diff for the MRs in the set, then discard all but the most recent for
         each. This association means that Rails can just query for N diffs from N
         MRs.
      3. It's more complicated to update. This is a bidirectional foreign key, so we
         need to update two tables when adding a diff record. This also means we need
         to handle this as a special case when importing a GitLab project.
      
      There is some juggling with this association in the merge request model:
      
      * `MergeRequest#latest_merge_request_diff` is _always_ the latest diff.
      * `MergeRequest#merge_request_diff` reuses
        `MergeRequest#latest_merge_request_diff` unless:
          * Arguments are passed. These are typically to force-reload the association.
          * It doesn't exist. That means we might be trying to implicitly create a
            diff. This only seems to happen in specs.
          * The association is already loaded. This is important for the reasons
            explained in the comment, which I'll reiterate here: if we a) load a
            non-latest diff, then b) get its `merge_request`, then c) get that MR's
            `merge_request_diff`, we should get the diff we loaded in c), even though
            that's not the latest diff.
      
      Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases,
      but not quite all.
      991bf24e
  17. 20 11月, 2017 1 次提交
  18. 07 11月, 2017 4 次提交
  19. 06 11月, 2017 1 次提交
  20. 03 11月, 2017 4 次提交
  21. 02 11月, 2017 1 次提交
  22. 01 11月, 2017 1 次提交
  23. 31 10月, 2017 3 次提交
  24. 14 10月, 2017 1 次提交