Commit 04bc6b8
feat(gc): include STALE and REMOVING dataset versions in GC cleanup (#1621)
* feat(gc): include STALE dataset versions in GC cleanup
Studio's lifecycle system (datachain-ai/studio#12515) marks excess
dataset versions as STALE instead of deleting them directly. The
datachain GC must then perform the actual warehouse and metastore
deletion.
Add DatasetStatus.STALE to get_incomplete_dataset_versions() so
STALE versions with a finished or absent job are returned and
removed by cleanup_failed_dataset_versions().
* Update metastore.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat(dataset): add REMOVING status for versions marked for deletion
Introduce DatasetStatus.REMOVING so versions marked for deletion are distinct from STALE. Include REMOVING in get_incomplete_dataset_versions cleanup query and update tests accordingly.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 2ba2f6b commit 04bc6b8
File tree
3 files changed
+56
-5
lines changed- src/datachain
- data_storage
- tests/unit
3 files changed
+56
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
340 | 343 | | |
341 | 344 | | |
342 | 345 | | |
| |||
1654 | 1657 | | |
1655 | 1658 | | |
1656 | 1659 | | |
1657 | | - | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1658 | 1668 | | |
1659 | 1669 | | |
1660 | 1670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| |||
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| 344 | + | |
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
0 commit comments