Repository navigation
Commit 23231e6
committed
fix(array): encode new array metadata before deleting an existing node
With the rectilinear flag checked when metadata is stored rather than when
it is built, `zarr.create(..., overwrite=True)` with rectilinear chunks
and the flag off deleted the existing array and then raised; zarr 3.4.0
raised before deleting anything. `AsyncArray._create_v2`, `_create_v3`
and `init_array` now build and encode the new metadata before
`_prepare_overwrite`, so metadata that cannot be stored fails with the
store untouched. This also covers `create_array(..., overwrite=True)`,
which deleted the existing array before validating its arguments.
Assisted-by: ClaudeCode:claude-opus-5-51 parent 1a91532 commit 23231e6
3 files changed
Lines changed: 29 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
650 | | - | |
651 | 649 | | |
652 | 650 | | |
653 | 651 | | |
| |||
665 | 663 | | |
666 | 664 | | |
667 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
| |||
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
724 | | - | |
725 | | - | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
751 | 755 | | |
752 | 756 | | |
753 | 757 | | |
| |||
4591 | 4595 | | |
4592 | 4596 | | |
4593 | 4597 | | |
4594 | | - | |
4595 | | - | |
4596 | 4598 | | |
4597 | 4599 | | |
4598 | 4600 | | |
| |||
4705 | 4707 | | |
4706 | 4708 | | |
4707 | 4709 | | |
| 4710 | + | |
| 4711 | + | |
| 4712 | + | |
| 4713 | + | |
4708 | 4714 | | |
4709 | 4715 | | |
4710 | 4716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
1474 | 1482 | | |
1475 | 1483 | | |
1476 | 1484 | | |
| |||
1481 | 1489 | | |
1482 | 1490 | | |
1483 | 1491 | | |
1484 | | - | |
1485 | | - | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1486 | 1500 | | |
1487 | 1501 | | |
1488 | 1502 | | |
| |||
0 commit comments