summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2017-11-29 09:12:12 +0000
committerRémy Coutable <remy@rymai.me>2017-11-29 09:12:12 +0000
commit64e5f996fa01d2e9c8462cfbb647997531eaf6c7 (patch)
treeb3bebc2fd1be9822f8be2124aee9acff5acd3ded /db
parenta4f8dddc212fcd91f6a4a09e92b2de6117a21305 (diff)
downloadgitlab-ce-64e5f996fa01d2e9c8462cfbb647997531eaf6c7.tar.gz
Add timeouts for Gitaly calls
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb31
-rw-r--r--db/schema.rb3
2 files changed, 34 insertions, 0 deletions
diff --git a/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb b/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb
new file mode 100644
index 00000000000..de621e7111c
--- /dev/null
+++ b/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb
@@ -0,0 +1,31 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddGitalyTimeoutPropertiesToApplicationSettings < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default :application_settings,
+ :gitaly_timeout_default,
+ :integer,
+ default: 55
+ add_column_with_default :application_settings,
+ :gitaly_timeout_medium,
+ :integer,
+ default: 30
+ add_column_with_default :application_settings,
+ :gitaly_timeout_fast,
+ :integer,
+ default: 10
+ end
+
+ def down
+ remove_column :application_settings, :gitaly_timeout_default
+ remove_column :application_settings, :gitaly_timeout_medium
+ remove_column :application_settings, :gitaly_timeout_fast
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 804bc8d6e37..1e524621b4f 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -150,6 +150,9 @@ ActiveRecord::Schema.define(version: 20171124132536) do
t.integer "throttle_authenticated_web_period_in_seconds", default: 3600, null: false
t.boolean "password_authentication_enabled_for_web"
t.boolean "password_authentication_enabled_for_git", default: true
+ t.integer "gitaly_timeout_default", default: 55, null: false
+ t.integer "gitaly_timeout_medium", default: 30, null: false
+ t.integer "gitaly_timeout_fast", default: 10, null: false
end
create_table "audit_events", force: :cascade do |t|