Skip to content

Commit 9ba4f20

Browse files
authored
Fix thread interruptions (#2954)
1 parent e652c54 commit 9ba4f20

File tree

6 files changed

+3
-6
lines changed

6 files changed

+3
-6
lines changed

gems/aws-sdk-s3/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Unreleased Changes
22
------------------
33

4+
* Issue - Fix thread interruptions in multipart `download_file`, `file_uploader` and `stream_uploader` (#2944).
5+
46
1.139.0 (2023-11-22)
57
------------------
68

gems/aws-sdk-s3/lib/aws-sdk-s3/file_downloader.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ def download_in_threads(pending, total_size)
190190
raise error
191191
end
192192
end
193-
thread.abort_on_exception = true
194193
threads << thread
195194
end
196195
threads.map(&:value).compact

gems/aws-sdk-s3/lib/aws-sdk-s3/multipart_file_uploader.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ def upload_in_threads(pending, completed, options)
175175
error
176176
end
177177
end
178-
thread.abort_on_exception = true
179178
threads << thread
180179
end
181180
threads.map(&:value).compact

gems/aws-sdk-s3/lib/aws-sdk-s3/multipart_stream_uploader.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ def upload_in_threads(read_pipe, completed, options, thread_errors)
192192
error
193193
end
194194
end
195-
thread.abort_on_exception = true
196195
thread
197196
end
198197
end

gems/aws-sdk-s3/spec/object/download_file_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ module S3
221221
end
222222

223223
it 'raises an error when checksum validation fails on multipart' do
224-
client.stub_responses(:get_object, {body: 'body', checksum_sha1: 'invalid'})
224+
client.stub_responses(:get_object, { body: 'body', checksum_sha1: 'invalid' })
225225

226226
thread = double(value: nil)
227-
allow(thread).to receive(:abort_on_exception=)
228227
expect(Thread).to receive(:new).and_yield.and_return(thread)
229228

230229
expect do

gems/aws-sdk-s3/spec/object/upload_file_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ module S3
170170

171171
it 'reports progress for multipart uploads' do
172172
thread = double(value: nil)
173-
allow(thread).to receive(:abort_on_exception=)
174173
allow(Thread).to receive(:new).and_yield.and_return(thread)
175174

176175
client.stub_responses(:create_multipart_upload, upload_id: 'id')

0 commit comments

Comments
 (0)