Commit aeccf57
committed
Fix heavyweight backups of tasks that have images and a non-default frame range
Let's say we have a cloud storage-based tasks that was created with 6 input
images, and the following settings: start frame 1, stop frame 4, frame step
2. A heavyweight backup of such a task will then contain only frames 1 and 3
in the `data` directory; however, the manifest will still contain all 6
frames. If you try to restore such a backup, CVAT will fail, because it
checks that the files in the `data` directory correspond 1:1 to the
manifest.
This could potentially be fixed in the restore code; however, it seems to me
that the backups created in this case are incorrect, as they have manifests
referencing nonexistent files. As such, I think it's more appropriate to fix
this in the backup code.
The fix is to filter the manifest during backup, leaving only entries
corresponding to frames that actually get backed up. We also need to reset
the frame range to the default, so that it matches the filtered manifest.
Note that the same bug also affects backups of tasks based on the mounted
share. It should be reasonably easy to fix (just use
`_write_filtered_media_manifest` in the `StorageChoice.SHARE` branch), but I
cannot test such a fix, because share backups are currently broken entirely.
So I will defer this fix until cvat-ai#9972.1 parent 98c0a2a commit aeccf57
File tree
7 files changed
+77
-11
lines changed- changelog.d
- cvat/apps/engine
- tests
- python/rest_api
7 files changed
+77
-11
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
| 426 | + | |
426 | 427 | | |
427 | 428 | | |
428 | 429 | | |
| |||
436 | 437 | | |
437 | 438 | | |
438 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
439 | 480 | | |
440 | 481 | | |
441 | 482 | | |
| |||
480 | 521 | | |
481 | 522 | | |
482 | 523 | | |
483 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
484 | 527 | | |
485 | 528 | | |
486 | 529 | | |
| |||
669 | 712 | | |
670 | 713 | | |
671 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
672 | 720 | | |
673 | 721 | | |
674 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
Loading
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | 1304 | | |
1309 | 1305 | | |
1310 | 1306 | | |
| |||
1317 | 1313 | | |
1318 | 1314 | | |
1319 | 1315 | | |
1320 | | - | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1321 | 1320 | | |
1322 | 1321 | | |
1323 | 1322 | | |
| |||
1335 | 1334 | | |
1336 | 1335 | | |
1337 | 1336 | | |
1338 | | - | |
| 1337 | + | |
1339 | 1338 | | |
1340 | 1339 | | |
1341 | 1340 | | |
| |||
1401 | 1400 | | |
1402 | 1401 | | |
1403 | 1402 | | |
1404 | | - | |
1405 | 1403 | | |
1406 | | - | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
1407 | 1417 | | |
1408 | 1418 | | |
1409 | 1419 | | |
| |||
0 commit comments