summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-09-26 15:09:37 +0100
committerSean McGivern <sean@gitlab.com>2017-09-29 11:56:08 +0100
commit1507ff8ab7d6f59b58978ad7385cb74603002409 (patch)
tree83db5d4f422480092192938b97df581862af109f /lib/api/helpers.rb
parent917194153f066556e0ebff92f9c1486144948535 (diff)
downloadgitlab-ce-1507ff8ab7d6f59b58978ad7385cb74603002409.tar.gz
Make MR diff background migration less likely to time out
This version does not use transactions, but individual statements. As we have unique constraints on the target tables for the inserts, we can just ignore uniqueness violations there (as long as we always insert the same batch size, in the same order). This means the spec now must use truncation, not a transaction, as the uniqueness violation means that the whole transaction for that spec would be invalid, which isn't what we'd want. In real-world use, this isn't run in a transaction anyway. This commit also wraps unhandled exceptions, for easier finding in Sentry, and logs with a consistent format, for easier searching.
Diffstat (limited to 'lib/api/helpers.rb')
0 files changed, 0 insertions, 0 deletions