Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

enh: Do not wait for transfer completion for each fetch #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions mars/services/storage/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ async def fetch_batch(
)
fetch_keys.extend(list(keys))

await asyncio.gather(*transfer_tasks)
yield asyncio.gather(*transfer_tasks)

append_bands_delays = []
for data_key in fetch_keys:
Expand All @@ -562,7 +562,7 @@ async def fetch_batch(
)
if append_bands_delays:
await meta_api.add_chunk_bands.batch(*append_bands_delays)
return fetch_keys
raise mo.Return(fetch_keys)

async def request_quota_with_spill(self, level: StorageLevel, size: int):
if await self._quota_refs[level].request_quota(size):
Expand Down