diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-23 19:25:11 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-27 19:55:20 +0300 |
commit | 31a1ce2132d83e333e84f365b9aada2e17c61b43 (patch) | |
tree | 66d3a02000d2998f7b6f583ed669fd59939c88e7 /app | |
parent | 2e3dab38295b7c36ab100f20c654fdfaf9b00885 (diff) |
Lock writes to trace stream
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build_trace_chunk.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build_trace_chunk.rb b/app/models/ci/build_trace_chunk.rb index 108874b75a6..7c84bd734bb 100644 --- a/app/models/ci/build_trace_chunk.rb +++ b/app/models/ci/build_trace_chunk.rb @@ -76,7 +76,7 @@ module Ci raise ArgumentError, 'Offset is out of range' if offset > size || offset < 0 raise ArgumentError, 'Chunk size overflow' if CHUNK_SIZE < (offset + new_data.bytesize) - in_lock(*lock_params) do # Write opetation is atomic + in_lock(*lock_params) do # Write operation is atomic unsafe_set_data!(data.byteslice(0, offset) + new_data) end @@ -100,7 +100,7 @@ module Ci end def persist_data! - in_lock(*lock_params) do # Write opetation is atomic + in_lock(*lock_params) do # Write operation is atomic unsafe_persist_to!(self.class.persistable_store) end end |