BigW Consortium Gitlab

  1. 14 Feb, 2017 2 commits
  2. 10 Feb, 2017 1 commit
    • Add method for creating foreign keys concurrently · a97dcc07
      Yorick Peterse authored
      This method allows one to create foreign keys without blocking access to
      the source table, but only on PostgreSQL.
      
      When creating a regular foreign key the "ALTER TABLE" statement used for
      this won't return until all data has been validated. This statement in
      turn will acquire a lock on the source table. As a result this lock can
      be held for quite a long amount of time, depending on the number of rows
      and system load.
      
      By breaking up the foreign key creation process in two steps (creation,
      and validation) we can reduce the amount of locking to a minimum.
      Locking is still necessary for the "ALTER TABLE" statement that adds the
      constraint, but this is a fast process and so will only block access for
      a few milliseconds.
  3. 17 Jan, 2017 1 commit
  4. 17 Nov, 2016 3 commits
  5. 21 Sep, 2016 1 commit
  6. 20 Sep, 2016 5 commits
    • Implement a second round of review comments from @DouweM. · 918e589c
      Timothy Andrew authored
      - Don't use `TableReferences` - using `.arel_table` is shorter!
      - Move some database-related code to `Gitlab::Database`
      - Remove the `MergeRequest#issues_closed` and
        `Issue#closed_by_merge_requests`  associations. They were either
        shadowing or were too similar to existing methods. They are not being
        used anywhere, so it's better to remove them to reduce confusion.
      - Use Rails 3-style validations
      - Index for `MergeRequest::Metrics#first_deployed_to_production_at`
      - Only include `CycleAnalyticsHelpers::TestGeneration` for specs that
        need it.
      - Other minor refactorings.
    • Fix rubocop spec. · 231a9f5b
      Timothy Andrew authored
      And `scss_lint`
    • Implement (some) comments from @DouweM's review. · 71d4bf72
      Timothy Andrew authored
      - Move things common to `Issue` and `MergeRequest` into `Issuable`
      - Move more database-specific functions into `Gitlab::Database`
      - Indentation changes and other minor refactorings.
    • Implement review comments from @yorickpeterse · 8957293d
      Timothy Andrew authored
      1. Change multiple updates to a single `update_all`
      
      2. Use cascading deletes
      
      3. Extract an average function for the database median.
      
      4. Move database median to `lib/gitlab/database`
      
      5. Use `delete_all` instead of `destroy_all`
      
      6. Minor refactoring
  7. 16 Sep, 2016 1 commit
  8. 15 Jul, 2016 2 commits
  9. 17 Jun, 2016 1 commit
    • Fix update_column_in_batches to update all rows · c1e756c2
      Yorick Peterse authored
      This changes update_column_in_batches to ensure it always updates all
      rows now. These changes also allow for an extra SELECT query to be
      removed, nor does it use the row count for determining offsets and the
      likes; instead it's only used to determine the batch size.
  10. 16 Jun, 2016 2 commits
  11. 15 Jun, 2016 2 commits
    • Don't update columns in batches in a transaction · 816c4535
      Yorick Peterse authored
      This ensures that whatever locks are acquired aren't held onto until the
      end of the transaction (= after _all_ rows have been updated). Timing
      wise there's also no difference between using a transaction and not
      using one.
    • Customizing of update_column_in_batches queries · 8966263e
      Yorick Peterse authored
      By passing a block to update_column_in_batches() one can now customize
      the queries executed. This in turn can be used to only update a specific
      set of rows instead of simply all the rows in the table.
  12. 13 Jun, 2016 3 commits
  13. 06 Jun, 2016 1 commit
  14. 03 Jun, 2016 3 commits
  15. 22 May, 2016 2 commits
  16. 19 May, 2016 2 commits
  17. 12 May, 2016 3 commits