Class: Gitlab::Database::QueryAnalyzers::Ci::PartitioningRoutingAnalyzer

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/database/query_analyzers/ci/partitioning_routing_analyzer.rb

Overview

The purpose of this analyzer is to detect queries not going through a partitioning routing table

Constant Summary collapse

RoutingTableNotUsedError =
Class.new(QueryAnalyzerError)
ENABLED_TABLES =
%w[ci_builds_metadata].freeze

Constants inherited from Base

Base::QueryAnalyzerError

Class Method Summary collapse

Methods inherited from Base

analyzer_key, begin!, context, context_key, end!, requires_tracking?, suppress=, suppress_key, suppressed?, with_suppressed

Class Method Details

.analyze(parsed) ⇒ Object



19
20
21
# File 'lib/gitlab/database/query_analyzers/ci/partitioning_routing_analyzer.rb', line 19

def analyze(parsed)
  analyze_legacy_tables_usage(parsed)
end

.enabled?Boolean

Returns:

  • (Boolean)


14
15
16
17
# File 'lib/gitlab/database/query_analyzers/ci/partitioning_routing_analyzer.rb', line 14

def enabled?
  ::Feature::FlipperFeature.table_exists? &&
    ::Feature.enabled?(:ci_partitioning_analyze_queries, type: :ops)
end