Skip to content

Commit

Permalink
Smaller thresholds for copy_managed (#921)
Browse files Browse the repository at this point in the history
* Smaller threasholds for copy_managed

* correct
  • Loading branch information
martindurant authored Dec 11, 2024
1 parent ca949ab commit 7dd0e36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def setup_logging(level=None):
setup_logging()


MANAGED_COPY_THRESHOLD = 5 * 2**30
MANAGED_COPY_THRESHOLD = 150 * 2**20
# Certain rate-limiting responses can send invalid XML
# (see https://github.com/fsspec/s3fs/issues/484), which can result in a parser error
# deep within botocore. So we treat those as retryable as well, even though there could
Expand Down Expand Up @@ -1899,7 +1899,7 @@ async def _copy_etag_preserved(self, path1, path2, size, total_parts, **kwargs):
)
self.invalidate_cache(path2)

async def _copy_managed(self, path1, path2, size, block=5 * 2**30, **kwargs):
async def _copy_managed(self, path1, path2, size, block=50 * 2**20, **kwargs):
"""Copy file between locations on S3 as multi-part
block: int
Expand All @@ -1921,7 +1921,7 @@ async def _copy_managed(self, path1, path2, size, block=5 * 2**30, **kwargs):
Key=key,
PartNumber=i + 1,
UploadId=mpu["UploadId"],
CopySource=path1,
CopySource=self._strip_protocol(path1),
CopySourceRange="bytes=%i-%i" % (brange_first, brange_last),
)
for i, (brange_first, brange_last) in enumerate(_get_brange(size, block))
Expand Down

0 comments on commit 7dd0e36

Please sign in to comment.