Commit 098fbac1 authored by Shinya Maeda's avatar Shinya Maeda

Add a gurad logic not to hit chunk_store if unnecessary

parent f0ddad75
...@@ -102,6 +102,8 @@ module Gitlab ...@@ -102,6 +102,8 @@ module Gitlab
until eof? until eof?
data = get_chunk data = get_chunk
break if data.empty?
new_line = data.index("\n") new_line = data.index("\n")
if !new_line.nil? if !new_line.nil?
...@@ -150,6 +152,8 @@ module Gitlab ...@@ -150,6 +152,8 @@ module Gitlab
end end
def get_chunk def get_chunk
return '' unless size > 0
unless in_range? unless in_range?
chunk_store.open(job_id, chunk_index, params_for_store) do |store| chunk_store.open(job_id, chunk_index, params_for_store) do |store|
@chunk = store.get @chunk = store.get
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment