Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
0c101b90bd
commit
afa7157f77
|
|
@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66525
|
|||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/336592
|
||||
milestone: '14.2'
|
||||
type: development
|
||||
group: group::authentication
|
||||
group: group::authorization
|
||||
default_enabled: true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveBrokenFkBetweenCiPipelinesBuildConfigs < Gitlab::Database::Migration[2.2]
|
||||
include Gitlab::Database::PartitioningMigrationHelpers::ForeignKeyHelpers
|
||||
|
||||
milestone '17.7'
|
||||
disable_ddl_transaction!
|
||||
|
||||
SOURCE_TABLE_NAME = :p_ci_builds_execution_configs
|
||||
TARGET_TABLE_NAME = :p_ci_pipelines
|
||||
COLUMN = :pipeline_id
|
||||
TARGET_COLUMN = :id
|
||||
PARTITION_COLUMN = :partition_id
|
||||
FK_NAME = :fk_rails_c26408d02c_p
|
||||
|
||||
def up
|
||||
with_lock_retries do
|
||||
remove_foreign_key_if_exists(
|
||||
SOURCE_TABLE_NAME,
|
||||
TARGET_TABLE_NAME,
|
||||
name: FK_NAME,
|
||||
reverse_lock_order: true
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
add_concurrent_partitioned_foreign_key(
|
||||
SOURCE_TABLE_NAME,
|
||||
TARGET_TABLE_NAME,
|
||||
column: [PARTITION_COLUMN, COLUMN],
|
||||
target_column: [PARTITION_COLUMN, TARGET_COLUMN],
|
||||
validate: true,
|
||||
reverse_lock_order: true,
|
||||
on_update: :cascade,
|
||||
on_delete: :cascade,
|
||||
name: FK_NAME
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
831f8eae21239b82296392eef5234bc90fe07d8b07a1d484f51949e1f5cc921e
|
||||
|
|
@ -38605,9 +38605,6 @@ ALTER TABLE ONLY labels
|
|||
ALTER TABLE ONLY project_feature_usages
|
||||
ADD CONSTRAINT fk_rails_c22a50024b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE p_ci_builds_execution_configs
|
||||
ADD CONSTRAINT fk_rails_c26408d02c_p FOREIGN KEY (partition_id, pipeline_id) REFERENCES p_ci_pipelines(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY project_repositories
|
||||
ADD CONSTRAINT fk_rails_c3258dc63b FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT;
|
||||
|
||||
|
|
|
|||
|
|
@ -4262,8 +4262,6 @@ In this example:
|
|||
- You can use the `$` character for both variables and paths. For example, if the
|
||||
`$VAR` variable exists, its value is used. If it does not exist, the `$` is interpreted
|
||||
as being part of a path.
|
||||
- You cannot use [nested variables](../variables/where_variables_can_be_used.md#nested-variable-expansion)
|
||||
with `changes`. See [issue 425803](hhttps://gitlab.com/gitlab-org/gitlab/-/issues/425803) for more details.
|
||||
|
||||
**Related topics**:
|
||||
|
||||
|
|
@ -4388,11 +4386,6 @@ In this example:
|
|||
|
||||
**Additional details**:
|
||||
|
||||
- CI/CD variables used with `rules:exists` have some limitations:
|
||||
- You cannot use [nested variables](../variables/where_variables_can_be_used.md#nested-variable-expansion)
|
||||
with `exists`. See [issue 411344](https://gitlab.com/gitlab-org/gitlab/-/issues/411344) for more details.
|
||||
- In some cases you cannot use `/` or `./` in a CI/CD variable with `exists`.
|
||||
See [issue 386595](https://gitlab.com/gitlab-org/gitlab/-/issues/386595) for more details.
|
||||
- Glob patterns are interpreted with Ruby's [`File.fnmatch`](https://docs.ruby-lang.org/en/master/File.html#method-c-fnmatch)
|
||||
with the [flags](https://docs.ruby-lang.org/en/master/File/Constants.html#module-File::Constants-label-Filename+Globbing+Constants+-28File-3A-3AFNM_-2A-29)
|
||||
`File::FNM_PATHNAME | File::FNM_DOTMATCH | File::FNM_EXTGLOB`.
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@ info: Any user with at least the Maintainer role can merge updates to this conte
|
|||
|
||||
# Large tables limitations
|
||||
|
||||
GitLab implements some limitations on large database tables to improve manageability for both GitLab and its customers. The list of tables subject to these limitations is defined in [`rubocop/rubocop-migrations.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/rubocop/rubocop-migrations.yml).
|
||||
GitLab enforces some limitations on large database tables schema changes to improve manageability for both GitLab and its customers. The list of tables subject to these limitations is defined in [`rubocop/rubocop-migrations.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/rubocop/rubocop-migrations.yml).
|
||||
|
||||
## Table size restrictions
|
||||
|
||||
The following limitations apply to table modifications on GitLab.com:
|
||||
The following limitations apply to table schema changes on GitLab.com:
|
||||
|
||||
| Action | Maximum size (including indexes) |
|
||||
| Limitation | Maximum size after the action (including indexes and column size) |
|
||||
| ------ | ------------------------------- |
|
||||
| Add an index | 50 GB |
|
||||
| Add a column with foreign key | 50 GB |
|
||||
| Add a new column | 100 GB |
|
||||
| Can not add an index | 50 GB |
|
||||
| Can not add a column with foreign key | 50 GB |
|
||||
| Can not add a new column | 100 GB |
|
||||
|
||||
These limitations align with our goal to maintain [all tables under 100 GB](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/database_size_limits/) for improved [stability and performance](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/database_size_limits/#motivation-gitlabcom-stability-and-performance).
|
||||
|
||||
|
|
@ -62,6 +62,11 @@ This approach is particularly effective when:
|
|||
- The new column applies to a subset of the main table
|
||||
- Only specific queries need the new data
|
||||
|
||||
Disadvantages
|
||||
|
||||
1. More tables may result in more "joins" which will complicate queries
|
||||
1. Queries with multiple joins may end up being hard to optimize
|
||||
|
||||
## Related links
|
||||
|
||||
- [Database size limits](https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/database_size_limits/#solutions)
|
||||
|
|
|
|||
Loading…
Reference in New Issue