From 71ed7987d3a7ab16677cb2b87721f391e8daaf13 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 4 Jun 2018 16:20:01 +0200 Subject: Perform pull request IO work outside a transaction When importing a GitHub pull request we would perform all work in a single database transaction. This is less than ideal, because we perform various slow Git operations when creating a merge request. This in turn can lead to many DB connections being used, while just waiting for an IO operation to complete. To work around this, we now move most of the heavy lifting out of the database transaction. Some extra error handling is added to ensure we can resume importing a partially imported pull request, instead of just throwing an error. This commit also changes the specs for IssueImporter so they don't rely on deprecated RSpec methods. --- changelogs/unreleased/gh-importer-transactions.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/gh-importer-transactions.yml (limited to 'changelogs') diff --git a/changelogs/unreleased/gh-importer-transactions.yml b/changelogs/unreleased/gh-importer-transactions.yml new file mode 100644 index 00000000000..1489d60a3fb --- /dev/null +++ b/changelogs/unreleased/gh-importer-transactions.yml @@ -0,0 +1,5 @@ +--- +title: Move PR IO operations out of a transaction +merge_request: +author: +type: performance -- cgit v1.2.3