Skip to content

Commit 4c86c95

Browse files
author
maniarathi
committed
CLI is using a blocksize that is different than upload. Changing to match.
1 parent 20caac2 commit 4c86c95

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

hca/upload/lib/client_side_checksum_handler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class ChecksumCalculator:
3636
""" The ChecksumCalculator encapsulates calling various library functions based on the required checksum to
3737
be calculated on a file."""
3838

39-
READ_BLOCKSIZE = 10 * 1024 * 1024 # Do I/O in 10MiB chunks.
40-
4139
def __init__(self, filename, checksums=CHECKSUM_NAMES):
4240
self._filename = filename
4341
self._checksums = checksums
@@ -49,7 +47,7 @@ def compute(self):
4947
_multipart_chunksize = get_s3_multipart_chunk_size(_file_size)
5048
with ChecksummingSink(_multipart_chunksize, hash_functions=self._checksums) as sink:
5149
with open(self._filename, 'rb') as _file_object:
52-
sink.write(_file_object.read(self.READ_BLOCKSIZE))
50+
sink.write(_file_object.read(_multipart_chunksize))
5351
checksums = sink.get_checksums()
5452
print("Checksumming took %.2f milliseconds to compute" % ((time.time() - start_time) * 1000))
5553
return checksums

0 commit comments

Comments
 (0)