diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-05-07 15:01:32 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-05-07 15:01:32 +0300 |
commit | 965d0394d371f427ad0423bda2a6dc8867b31563 (patch) | |
tree | 2fbe613e05f2d95d1b793bfbfcf7c8453113d409 /lib | |
parent | bf4073d53a988d7f31f2e099236041ed9f4f3b88 (diff) | |
parent | 1fd10d4f24778faae4c081b6c34921f6765b9929 (diff) |
Merge branch 'live-trace-v2-efficient-destroy-all' into 'master'
Live trace: Use efficient destroy all (for `dependent: :destory` problem)
See merge request gitlab-org/gitlab-ce!18575
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/trace.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/trace/chunked_io.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index f46d1d39ea7..fe15fabc2e8 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -100,7 +100,7 @@ module Gitlab FileUtils.rm(trace_path, force: true) end - job.trace_chunks.destroy_all + job.trace_chunks.fast_destroy_all job.erase_old_trace! end diff --git a/lib/gitlab/ci/trace/chunked_io.rb b/lib/gitlab/ci/trace/chunked_io.rb index cd3d1364411..bfe0c2a2c26 100644 --- a/lib/gitlab/ci/trace/chunked_io.rb +++ b/lib/gitlab/ci/trace/chunked_io.rb @@ -141,7 +141,7 @@ module Gitlab @size = offset # remove all next chunks - trace_chunks.where('chunk_index > ?', chunk_index).destroy_all + trace_chunks.where('chunk_index > ?', chunk_index).fast_destroy_all # truncate current chunk current_chunk.truncate(chunk_offset) @@ -158,7 +158,7 @@ module Gitlab end def destroy! - trace_chunks.destroy_all + trace_chunks.fast_destroy_all @tell = @size = 0 ensure invalidate_chunk_cache |