Job Failed spec/lib/gitlab/database/reindexing_spec.rb:178 master:broken
Job #2793482500 failed for e8bf6ca8:
Failures:
1) Gitlab::Database::Reindexing.perform_from_queue consumes the queue in order of created_at and applies the limit
Failure/Error: connection.send(...)
ActiveRecord::StatementInvalid:
PG::WrongObjectType: ERROR: "postgres_indexes" is not a view
HINT: Use DROP TABLE to remove a table.
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:89:in `method_missing'
# ./spec/support/helpers/database/database_helpers.rb:10:in `swapout_view_for_table'
# ./spec/lib/gitlab/database/reindexing_spec.rb:164:in `block (3 levels) in <main>'
# ------------------
# --- Caused by: ---
# PG::WrongObjectType:
# ERROR: "postgres_indexes" is not a view
# HINT: Use DROP TABLE to remove a table.
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
2) Gitlab::Database::Reindexing.perform_from_queue updates queued action and sets state to done
Failure/Error: connection.send(...)
ActiveRecord::StatementInvalid:
PG::WrongObjectType: ERROR: "postgres_indexes" is not a view
HINT: Use DROP TABLE to remove a table.
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:89:in `method_missing'
# ./spec/support/helpers/database/database_helpers.rb:10:in `swapout_view_for_table'
# ./spec/lib/gitlab/database/reindexing_spec.rb:164:in `block (3 levels) in <main>'
# ------------------
# --- Caused by: ---
# PG::WrongObjectType:
# ERROR: "postgres_indexes" is not a view
# HINT: Use DROP TABLE to remove a table.
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
3) Gitlab::Database::Reindexing.perform_from_queue updates queued action upon error and sets state to failed
Failure/Error: connection.send(...)
ActiveRecord::StatementInvalid:
PG::WrongObjectType: ERROR: "postgres_indexes" is not a view
HINT: Use DROP TABLE to remove a table.
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
# ./lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:89:in `method_missing'
# ./spec/support/helpers/database/database_helpers.rb:10:in `swapout_view_for_table'
# ./spec/lib/gitlab/database/reindexing_spec.rb:164:in `block (3 levels) in <main>'
# ------------------
# --- Caused by: ---
# PG::WrongObjectType:
# ERROR: "postgres_indexes" is not a view
# HINT: Use DROP TABLE to remove a table.
# ./lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
4) Gitlab::Database::Reindexing.cleanup_leftovers! drops both leftover indexes
Failure/Error:
expect(connection).to receive(:execute).ordered.with(sql).and_wrap_original do |method, sql|
method.call(sql.sub(/CONCURRENTLY/, ''))
end
(#<Gitlab::Database::LoadBalancing::ConnectionProxy:0x00007f66a5436440 @load_balancer=#<Gitlab::Database::LoadBalancing::LoadBalancer:0x00007f66a54442e8 @configuration=#<Gitlab::Database::LoadBalancing::Configuration:0x00007f66a5445300 @max_replication_difference=8388608, @max_replication_lag_time=60.0, @replica_check_interval=60.0, @model=ActiveRecord::Base, @hosts=[], @service_discovery={:nameserver=>"localhost", :port=>8600, :record=>nil, :record_type=>"A", :interval=>60, :disconnect_timeout=>120, :use_tcp=>false}>, @primary_only=true, @host_list=#<Gitlab::Database::LoadBalancing::HostList:0x00007f66a54441a8 @hosts=[#<Gitlab::Database::LoadBalancing::PrimaryHost:0x00007f66a5444248 @load_balancer=#<Gitlab::Database::LoadBalancing::LoadBalancer:0x00007f66a54442e8 ...>>], @index=0, @mutex=#<Thread::Mutex:0x00007f66a5444158>, @hosts_gauge=#<Prometheus::Client::Gauge:0x00007f66b882a098 @mutex=#<Thread::Mutex:0x00007f66b882a048>, @validator=#<Prometheus::Client::LabelSetValidator:0x00007f66b8829fa8 @reserved_labels=[:job, :instance], @validated={3445753773187589798=>{}}>, @values={{}=>#<Prometheus::Client::MmapedValue:0x00007f66b8829058 @file_prefix="gauge_all", @metric_name=:db_load_balancing_hosts, @name=:db_load_balancing_hosts, @labels={}, @pid=10490, @mutex=#<Thread::Mutex:0x00007f66b8828d10>, @file=#<Prometheus::Client::MmapedDict:0x147b188>, @key="[\"db_load_balancing_hosts\",\"db_load_balancing_hosts\",[],[]]", @value=1>}, @name=:db_load_balancing_hosts, @docstring="Current number of load balancing hosts", @base_labels={}, @multiprocess_mode=:all>>>>).execute("SET lock_timeout TO '60000ms'")
expected: 1 time with arguments: ("SET lock_timeout TO '60000ms'")
received: 0 times
# ./spec/lib/gitlab/database/reindexing_spec.rb:244:in `expect_query'
# ./spec/lib/gitlab/database/reindexing_spec.rb:221:in `block (4 levels) in <main>'
# ./lib/gitlab/database/shared_model.rb:34:in `using_connection'
# ./spec/lib/gitlab/database/reindexing_spec.rb:220:in `block (3 levels) in <main>'
# ./spec/spec_helper.rb:426:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:417:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:413:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:52:in `with_raw_context'
# ./spec/spec_helper.rb:413:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:264:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <main>'
Finished in 1 minute 11.76 seconds (files took 43.94 seconds to load)
90 examples, 4 failures
Failed examples:
rspec ./spec/lib/gitlab/database/reindexing_spec.rb:178 # Gitlab::Database::Reindexing.perform_from_queue consumes the queue in order of created_at and applies the limit
rspec ./spec/lib/gitlab/database/reindexing_spec.rb:187 # Gitlab::Database::Reindexing.perform_from_queue updates queued action and sets state to done
rspec ./spec/lib/gitlab/database/reindexing_spec.rb:201 # Gitlab::Database::Reindexing.perform_from_queue updates queued action upon error and sets state to failed
rspec ./spec/lib/gitlab/database/reindexing_spec.rb:232 # Gitlab::Database::Reindexing.cleanup_leftovers! drops both leftover indexes