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
2019-12-10Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-10-11Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-18Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-13Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-08-30Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher
2019-08-23CE port: allow SRV records in DB service discoveryTiger
2019-08-22Limit the size of issuable description and commentsAlexandru Croitor
Limiting the size of issuable description and comments to 1_000_000, which is close to ~1MB of ASCII characters, which represents 99.9% of all descriptions and comments we have in DB at the moment. This should help prevent DoS attacks when comments contain refference strings. Also this change updates regexp matching the namespaces paths by limiting the namespaces paths to Namespace::NUMBER_OF_ANCESTORS_ALLOWED, as we allow 20 levels deep groups. see https://gitlab.com/gitlab-org/gitlab-ce/issues/61974#note_191274234
2019-07-29Further remove code branches by database typeAndreas Brandl
We dropped MySQL support and a lot of mysql specific code has been removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608. This comes in from the other direction and removes any `if postgresql?` branches.
2019-07-23Remove dead MySQL codeNick Thomas
None of this code can be reached any more, so it can all be removed
2019-07-12Merge branch 'js-specs-transactions' into 'master'Andreas Brandl
Use transactions in JS feature specs Closes #60207 See merge request gitlab-org/gitlab-ce!27496
2019-07-12Use transactions in JS feature specsHeinrich Lee Yu
Uses Rails transactional tests instead of DatabaseCleaner transaction strategy because that doesn't work with JS tests
2019-07-12Upgrade to Rails 5.2Heinrich Lee Yu
Updates changed method names and fixes spec failures
2019-07-10Add a rubocop for Rails.loggerMayra Cabrera
Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-06-28Fix extra newline left by conflict resolutionDJ Mountney
2019-06-28Merge branch 'master' into 'check-min-schema-migrate'DJ Mountney
# Conflicts: # lib/gitlab/database.rb
2019-06-28Adds metrics to measure database transactionsAndrew Newdigate
Currently we don't have good insight into the affect of Rails transaction blocks on the application. If these blocks are held open for extended periods, they can have detrimental effects on the application. This change will allow us to track these transactions, with the aim of reducing their duration.
2019-06-25Update comments and docs around min schema versionDJ Mountney
Fixed some spelling Dropped rake task description for a prefix only task Added note on skipping the check to the postgres debugging dev doc
2019-06-25Move min schema version check to db:migrateDJ Mountney
Rather than have it checked only as part of gitlab:db:configure, we will instead have it as a pre-req for every db:migrate command
2019-06-25Check supported version when migratingDJ Mountney
Set the mininum supported migration version to be the schema version as of 11.11.0, and errors you if that is not detected during gitlab:db:configure
2019-06-25Refactor inside_transaction? to Gitlab::DatabaseAndrew Newdigate
This is a small change to move AfterCommitQueue.inside_transaction? to Gitlab::Database.inside_transaction? Since this change is required by different changes which may not arrive in sequence, it's easier to extract this change out on it's own.
2019-03-22Add helper method to return a human-friendly name for database adapterDouglas Barbosa Alexandre
2019-03-14Rename pg_stat_wal_receiver_supported? DB helperAsh McKenzie
From pg_stat_wal_receiver_supported? to postgresql_minimum_supported_version? Also add test coverage
2018-12-16Remove rails4 specific codeJasper Maes
2018-11-26CE port of 'Move EE specific code from Gitbab::Database into ee'Douglas Barbosa Alexandre
2018-10-22Enable frozen string for lib/gitlab/*.rbgfyoung
2018-09-12Ensure the schema is loaded with post_migrations includedDJ Mountney
If doing a schema load, the post_migrations should also be marked as up, even if SKIP_POST_DEPLOYMENT_MIGRATIONS was set, otherwise future migration runs will be broken.
2018-07-24Backport various EE changes to Gitlab::DatabaseYorick Peterse
These changes are useful for CE as well. For example, the MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20720 can make use of some of the backported methods.
2018-07-06Ability to check if underlying database is read onlyBrett Walker
2018-06-14Use data_source_exists? instead of table_exists?Jarka Kadlecová
Use data_source_exists? where possible instead of table_exists? in order to be Rails5 compatible
2018-05-17Memoize Gitlab::Database.versionYorick Peterse
This removes the need for running a database query every time we want to check the database version.
2018-03-15Cache table_exists?('application_settings') to reduce repeated schema reloadsStan Hu
Closes #43355
2018-03-15Cache column_exists? for application settingsStan Hu
This is most a backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4987/diffs but includes other columns that use column_exists? in a way that may cause unnecessary schema loads.
2017-12-07Merge branch 'mk-add-old-attachments-to-uploads-table' into 'master'Stan Hu
Add old files to uploads table See merge request gitlab-org/gitlab-ce!15270
2017-12-05add Gitlab::Database.replication_slots_supported?Brett Walker
2017-12-02Ensure consistent column orderMichael Kozono
2017-12-02Don’t quote `NOW()` for created_at columnMichael Kozono
To fix for MySQL.
2017-11-08Add returning IDs to Gitlab::Database.bulk_insertYorick Peterse
This adds the keyword argument "return_ids" to Gitlab::Database.bulk_insert. When set to `true` (and PostgreSQL is used) this method will return an Array of the IDs of the inserted rows, otherwise it will return an empty Array.
2017-10-31Handle large values on `MergeRequestDiffCommit` datesAlejandro Rodríguez
2017-10-06Create idea of read-only databaseToon Claes
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo secondary node). But in GitLab CE it also might be useful to have the "read-only" idea around. So port it back to GitLab CE. Also having the principle of read-only in GitLab CE would hopefully lead to less errors introduced, doing write operations when there aren't allowed for read-only calls. Closes gitlab-org/gitlab-ce#37534.
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-10Use a specialized class for querying eventsYorick Peterse
This changes various controllers to use the new EventCollection class for retrieving events. This class uses a JOIN LATERAL query on PostgreSQL to retrieve queries in a more efficient way, while falling back to a simpler / less efficient query for MySQL. The EventCollection class also includes a limit on the number of events to display to prevent malicious users from cycling through all events, as doing so could put a lot of pressure on the database. JOIN LATERAL is only supported on PostgreSQL starting with version 9.3.0 and as such this optimisation is only used when using PostgreSQL 9.3 or newer.
2017-06-26Fix Gitlab::Database.bulk_insert for non-UTF-8 dataSean McGivern
2017-06-16Add table for files in merge request diffsSean McGivern
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.
2017-04-11removes redundant code from database.rbTiago Botelho
2017-03-17Added Gitlab::Database.configYorick Peterse
This returns the ActiveRecord configuration for the current environment. While CE doesn't use this very often, EE will use it in a few places for the database load balancing code. I'm adding this to CE so we don't end up with merge conflicts in this file.
2017-03-02removes redundant code from gitlab database fileTiago Botelho
2017-02-22Allow setting of a custom connection pool hostYorick Peterse
This allows you to set a custom host when calling Gitlab::Database.create_connection_pool. This is necessary for load balancing as in this case we want to inherit all settings except for the hostname.
2017-02-14Merge branch 'create-connection-pool' into 'master' Yorick Peterse
Introduce Gitlab::Database.with_connection_pool See merge request !9192
2017-02-14Only ensure against yield so that pool should be availableLin Jen-Shin
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9192#note_23293693
2017-02-13Have some simple way to create connection poolLin Jen-Shin