Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-24Use the DatabaseCleaner 'deletion' strategy instead of 'truncation'Nick Thomas
2018-01-18Reduce UPDATEs for background column type changesYorick Peterse
Prior to this commit we would essentially update all rows in a table, even those where the source column (e.g. `issues.closed_at`) was NULL. This in turn could lead to statement timeouts when using the default batch size of 10 000 rows per job. To work around this we don't schedule jobs for rows where the source value is NULL. We also don't update rows where the source column is NULL (as an extra precaution) or the target column already has a non-NULL value. Using this approach it should be possible to update 10 000 rows in the "issues" table in about 7.5 - 8 seconds. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/42158
2018-01-05Run background migrations with a minimum intervalYorick Peterse
This adds a minimum interval to BackgroundMigrationWorker, ensuring background migrations of the same class only run once every 5 minutes. This prevents a thundering herd problem where scheduled migrations all run at once due to their delays having been expired (e.g. as the result of a queue being paused for a long time). If a job was recently executed it's rescheduled with a delay that equals the remaining time of the job's lease. This means that if the lease expires in two minutes we only need to wait two minutes, instead of five. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/41624
2018-01-03Use a background migration for issues.closed_atYorick Peterse
In a previous attempt (rolled back in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16021) we tried to migrate `issues.closed_at` from timestamp to timestamptz using a regular migration. This has a bad impact on GitLab.com and as such was rolled back. This commit re-implements the original migrations using generic background migrations, allowing us to still migrate the data in a single release but without a negative impact on availability. To ensure the database schema is up to date the background migrations are performed inline in development and test environments. We also make sure to not migrate that that doesn't need migrating in the first place or has already been migrated.
2017-12-05Consistently schedule Sidekiq jobsDouwe Maan
2017-11-20Don't move project repository/attachments when using hashed storageBob Van Landuyt
When a project is using hashed storage, the repositories and attachments wouldn't be saved on disk using the `full_path`. So the migration would not do anything. However: best to just skip moving when hashed storage is enabled.
2017-11-07Fix TRIGGER checks for MySQLYorick Peterse
This ensures we can check if the user has TRIGGER permissions without querying restricted tables. Thanks to Steve Norman (https://gitlab.com/stevenorman) for helping out with this merge request. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38372
2017-10-07Replaces `tag: true` into `:tag` in the specsJacopo
Replaces all the explicit include metadata syntax in the specs (tag: true) into the implicit one (:tag). Added a cop to prevent future errors and handle autocorrection.
2017-09-15Spread out the work a littleMichael Kozono
2017-09-15Extract helper for queuing background jobsMichael Kozono
2017-08-29Improve migrations using triggersYorick Peterse
This adds a bunch of checks to migrations that may create or drop triggers. Dropping triggers/functions is done using "IF EXISTS" so we don't throw an error if the object in question has already been dropped. We now also raise a custom error (message) when the user does not have TRIGGER privileges. This should prevent the schema from entering an inconsistent state while also providing the user with enough information on how to solve the problem. The recommendation of using SUPERUSER permissions is a bit extreme but we require this anyway (Omnibus also configures users with this permission). Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36633
2017-08-22Fix indentation in migration helpersGrzegorz Bizon
2017-08-22Add Sidekiq migration helpers for migrating queuesGrzegorz Bizon
2017-08-03Change all `:empty_project` to `:project`Robert Speicher
2017-08-01Ensure all project factories use `:repository` trait or `:empty_project`Robert Speicher
2017-07-27Use described_class when possibleRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable
services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-18Add a foreign key to `merge_requests.head_pipeline_id`Grzegorz Bizon
2017-07-11Support multiple Redis instances based on queue typePaul Charlton
2017-06-29Added code for defining SHA attributesYorick Peterse
These attributes are stored in binary in the database, but exposed as strings. This allows one to query/create data using plain SHA1 hashes as Strings, while storing them more efficiently as binary.
2017-06-27Adjust for new static-analysis failuresBob Van Landuyt
2017-06-26Keep failed renames in redisBob Van Landuyt
2017-06-26Use the migration name as a key in redisBob Van Landuyt
2017-06-26Don't break rolling back when a namespace or project was renamedBob Van Landuyt
2017-06-26Revert renames from a migrationBob Van Landuyt
2017-06-26Revert namespace renamesBob Van Landuyt
2017-06-26Add methods to revert project renamesBob Van Landuyt
2017-06-26Track all renames in redisBob Van Landuyt
2017-06-22Fix Rubocop offense in migration helpers specsGrzegorz Bizon
2017-06-22Merge branch 'master' into fix/gb/improve-updating-column-in-batches-helperGrzegorz Bizon
* master: (56 commits) File view buttons Don't reset the session when the example failed, because we need capybara-screenshot to have access to it Resolve "MR comment + system note highlight don't have the same width" Add feature spec for dashboard state filter tabs Wording of Mysql support. a new feature checklist and more elaborate documentation requirements Filter archived project in API v3 only if param present Revert to using links instead of buttons in Issuable Index tabs. Do not run the codeclimate job on docs-only changes Only show gray footer space if environment actions exist Migrate Gitlab::Git::Blob.find to Gitaly Backport filtered search lazy token consistent state fix Add a comment explaining how the branch clean up happens Fix Github::Representation::PullRequest#source_branch_exists? Add CHANGELOG Fix GitHub importer performance on branch existence check Rebuild the dynamic path before validating it Rename stage ref migration specs to match a class name Enable Style/DotPosition Rubocop :cop: Revert "Merge branch 'winh-merge-request-related-issues' into 'master'" ... Conflicts: db/post_migrate/20170526185921_migrate_build_stage_reference.rb
2017-06-22Disable transaction in specs for some migrationsGrzegorz Bizon
2017-06-22Fix specs for database migration helpers with transactionsGrzegorz Bizon
2017-06-21Fix migration specs that can not run within transactionGrzegorz Bizon
2017-06-21Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon
2017-06-21Raise if updating columns in batches within a transactionGrzegorz Bizon
2017-06-13Add database helpers 'add_timestamps_with_timezone' and ↵blackst0ne
'timestamps_with_timezone'
2017-05-25Merge branch '32851-fix-postgres-9-1' into 'master'Douwe Maan
Resolve "GitLab 9.0 to 9.2 is incompatible with PostgreSQL 9.1" See merge request !11709
2017-05-25Only use DROP INDEX CONCURRENTLY on postgreql 9.2+Nick Thomas
2017-05-24Revert "Remove changes that are not absolutely necessary"Douwe Maan
This reverts commit b0498c176fa134761d899c9b369be12f1ca789c5
2017-05-22Make sure that Arel.sql would work for update_column_in_batchesLin Jen-Shin
2017-05-18Fixes for the rename reserved paths helpersBob Van Landuyt
2017-05-16Disallow NULL on renamed column after default has been setDouwe Maan
2017-05-15Merge branch 'rename-column-concurrently-defaults' into 'master' Rémy Coutable
Fix adding defaults for concurrent column renames See merge request !11335
2017-05-12Only rename namespaces and projects with an invalid pathBob Van Landuyt
For exact matches, not namespaces that end with an invalid path
2017-05-12Fix adding defaults for concurrent column renamesYorick Peterse
By adding the default value _after_ adding the column we avoid updating all rows in a table, saving a lot of time and unnecessary work in the process.
2017-05-01Rename child namespaces in migrationhelpersBob Van Landuyt
2017-05-01Clear html cache for a projects milestonesBob Van Landuyt
2017-05-01Move ReservedPathsMigration into V1 namespaceBob Van Landuyt
2017-05-01Clear cached markdown after renaming projectsBob Van Landuyt
2017-05-01Rename Projects & Namespaces based on entire pathsBob Van Landuyt