Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller thresholds for copy_managed #921

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1862,7 +1862,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 @@ -1884,7 +1884,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
Loading