File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ async def get_partial_values(
105105 prototype : BufferPrototype ,
106106 byte_ranges : Iterable [ByteRequest | None ],
107107 ) -> list [Buffer | None ]:
108- return [await self .get (prototype , br ) for br in byte_ranges ]
108+ # Concurrency not needed, each .get() is a slice of an in-memory buffer.
109+ return [await self .get (prototype , byte_range ) for byte_range in byte_ranges ]
109110
110111
111112@dataclass (frozen = True )
@@ -482,7 +483,7 @@ async def _decode_partial_single(
482483 all_chunk_coords = {chunk_coords for chunk_coords , * _ in indexed_chunks }
483484
484485 # reading bytes of all requested chunks
485- shard_dict_maybe : ShardMapping | None = None
486+ shard_dict_maybe : ShardMapping | None
486487 if self ._is_total_shard (all_chunk_coords , chunks_per_shard ):
487488 # read entire shard
488489 shard_dict_maybe = await self ._load_full_shard_maybe (
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ async def get_partial_values(
190190 The read bytes for each range, or None for missing keys.
191191 """
192192 return await self .store .get_partial_values (
193- prototype , [(self .path , br ) for br in byte_ranges ]
193+ prototype , [(self .path , byte_range ) for byte_range in byte_ranges ]
194194 )
195195
196196 async def set (self , value : Buffer ) -> None :
You can’t perform that action at this time.
0 commit comments