From 4e87c02313241b1e0d36560a11014cb4b7992403 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Tue, 13 Sep 2016 18:28:45 +0200 Subject: Move pushes_since_gc to Redis This moves tracking of the pushes since the last Git GC from PostgreSQL to Redis. This reduces the number of writes on the "projects" table. This in turn reduces the vacuuming overhead. The lease used for incrementing the counter has been removed. This lease was mostly put in place to prevent high database load but this isn't needed anymore due to the counter now being stored in Redis. Fixes gitlab-org/gitlab-ce#22125 --- db/schema.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'db/schema.rb') diff --git a/db/schema.rb b/db/schema.rb index 5c283141084..61873e38113 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160902122721) do +ActiveRecord::Schema.define(version: 20160913162434) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -824,7 +824,6 @@ ActiveRecord::Schema.define(version: 20160902122721) do t.integer "build_timeout", default: 3600, null: false t.boolean "pending_delete", default: false t.boolean "public_builds", default: true, null: false - t.integer "pushes_since_gc", default: 0 t.boolean "last_repository_check_failed" t.datetime "last_repository_check_at" t.boolean "container_registry_enabled" -- cgit v1.2.1