Repository navigation
Commit 96d786a
fix(FsspecStore): propagate fs ownership through with_read_only
Addresses roborev review findings on the filesystem-ownership change:
- with_read_only() transferred fs ownership: it built the derived store
with _owns_fs=False while sharing the same fs. In the common
from_url(...).with_read_only() chain the only owner (the unreferenced
source) was GC'd without close(), reintroducing the unclosed-session
leak. Ownership now transfers to the surviving store and is cleared on
the source to avoid a double-close. Covered by a new test.
- close() now logs at debug before suppressing, so a regression in the
close path stays observable instead of silently reverting to leaking.
- Documented that set_session() lazily creates a session, so closing a
store that never did I/O may instantiate one purely to close it
(accepted best-effort behavior).
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent f4d4517 commit 96d786a
2 files changed
Lines changed: 47 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
270 | 278 | | |
271 | 279 | | |
272 | 280 | | |
273 | | - | |
| 281 | + | |
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
277 | 285 | | |
278 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
279 | 294 | | |
280 | 295 | | |
281 | 296 | | |
282 | 297 | | |
283 | 298 | | |
284 | 299 | | |
285 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
286 | 304 | | |
| 305 | + | |
| 306 | + | |
287 | 307 | | |
288 | 308 | | |
289 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
637 | 662 | | |
638 | 663 | | |
639 | 664 | | |
| |||
0 commit comments