Commit 48f7c9a
Feat: improves delete_dir for s3fs-backed FsspecStore (#2661)
* Implement asynchronous directory deletion in FsspecStore
- override Store.delete_dir default method, which deletes keys one by one, to support bulk deletion for fsspec implementations that support a list of paths in the fs._rm method.
- This can greatly reduce the number of requests to S3, which reduces likelihood of running into throttling errors and improves delete performance.
- Currently, only s3fs is supported.
* Use async batched _rm() for FsspecStore.delete_dir()
* Suppress allowed exceptions instead of try-except-pass
* Adds note on possibly redundant condition in FsspecStore.delete_dir()
* Fix: unpack allowed arguments list
* Adds tests for FsspecStore.delete_dir
* Update src/zarr/storage/_fsspec.py
Co-authored-by: Joe Hamman <[email protected]>
* Remove supports_listing condition from FsspecStore.delete_dir
* use f-string for url formatting
* assert `store.fs.asynchronous` instead of `store.fs.async_impl`
* updates release notes
* remove unused import
* Explicitly construct wrapped local filesystem for test
---------
Co-authored-by: Joe Hamman <[email protected]>
Co-authored-by: Joe Hamman <[email protected]>
Co-authored-by: Deepak Cherian <[email protected]>1 parent 23abb5b commit 48f7c9a
File tree
3 files changed
+48
-0
lines changed- changes
- src/zarr/storage
- tests/test_store
3 files changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
289 | 303 | | |
290 | 304 | | |
291 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
220 | 228 | | |
221 | 229 | | |
222 | 230 | | |
| |||
244 | 252 | | |
245 | 253 | | |
246 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
0 commit comments