Commit 5d08c7a9 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'remove-trace-chunks-feature-flag' into 'master'

Remove Redis trace chunks feature flag

See merge request gitlab-org/gitlab!65871
parents 01bd975e 607f6703
......@@ -14,19 +14,7 @@ module Ci
belongs_to :build, class_name: "Ci::Build", foreign_key: :build_id
default_value_for :data_store do |chunk|
# We're using the safe operator here to get to the project for which we're
# creating a TraceChunk because the build attribute would not be populated
# when the chunk was initialized by FactoryBot:
# https://github.com/thoughtbot/factory_bot/wiki/How-factory_bot-interacts-with-ActiveRecord
# While the `default_value_for` gem depends on an `after_initialize`
# callback.
if Feature.enabled?(:dedicated_redis_trace_chunks, chunk.build&.project, type: :ops)
:redis_trace_chunks
else
:redis
end
end
default_value_for :data_store, :redis_trace_chunks
after_create { metrics.increment_trace_operation(operation: :chunked) }
......
---
name: dedicated_redis_trace_chunks
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62938
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1096
milestone: '14.0'
type: ops
group: team::Scalability
default_enabled: false
......@@ -162,7 +162,7 @@ file storage. Redis is used as first-class storage, and it stores up-to 128KB
of data. After the full chunk is sent, it is flushed to a persistent store, either object storage (temporary directory) or database.
After a while, the data in Redis and a persistent store is archived to [object storage](#uploading-logs-to-object-storage).
The data are stored in the following Redis namespace: `Gitlab::Redis::SharedState`.
The data are stored in the following Redis namespace: `Gitlab::Redis::TraceChunks`.
Here is the detailed data flow:
......
......@@ -646,6 +646,7 @@ persistence classes.
| `queues` | Store Sidekiq background jobs. |
| `shared_state` | Store session-related and other persistent data. |
| `actioncable` | Pub/Sub queue backend for ActionCable. |
| `trace_chunks` | Store [CI trace chunks](../job_logs.md#enable-or-disable-incremental-logging) data. |
To make this work with Sentinel:
......@@ -657,6 +658,7 @@ To make this work with Sentinel:
gitlab_rails['redis_queues_instance'] = REDIS_QUEUES_URL
gitlab_rails['redis_shared_state_instance'] = REDIS_SHARED_STATE_URL
gitlab_rails['redis_actioncable_instance'] = REDIS_ACTIONCABLE_URL
gitlab_rails['redis_trace_chunks_instance'] = REDIS_TRACE_CHUNKS_URL
# Configure the Sentinels
gitlab_rails['redis_cache_sentinels'] = [
......@@ -675,6 +677,10 @@ To make this work with Sentinel:
{ host: ACTIONCABLE_SENTINEL_HOST, port: 26379 },
{ host: ACTIONCABLE_SENTINEL_HOST2, port: 26379 }
]
gitlab_rails['redis_trace_chunks_sentinels'] = [
{ host: TRACE_CHUNKS_SENTINEL_HOST, port: 26379 },
{ host: TRACE_CHUNKS_SENTINEL_HOST2, port: 26379 }
]
```
Note that:
......
......@@ -152,14 +152,6 @@ RSpec.describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state, :clean_git
context 'default value' do
it { expect(subject).to eq('redis_trace_chunks') }
context 'when dedicated_redis_trace_chunks is disabled' do
before do
stub_feature_flags(dedicated_redis_trace_chunks: false)
end
it { expect(subject).to eq('redis') }
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment