Commit 66b1c58
committed
Add persistent store-type meta to EmbedStore, DictStore and TreeStore
Each container now writes a type-identifying metalayer into its
underlying SChunk (embed.b2e) at creation time: "b2embed" for
EmbedStore, "b2dict" for DictStore, and "b2tree" for TreeStore.
The meta is read back on open and exposed via `store.storage.meta`.
`blosc2.open()` (_open_special_store) now checks this metalayer first
to dispatch to the right constructor, taking priority over the file
extension heuristic. This also fixes the latent bug where a .b2z file
created with DictStore would have been opened as a TreeStore.
Tests added to verify meta presence and persistence for all three
store types, including after close/reopen and via `blosc2.open()`.
Related with #546.1 parent fa0362c commit 66b1c58
4 files changed
Lines changed: 65 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
1486 | 1487 | | |
1487 | 1488 | | |
1488 | 1489 | | |
1489 | | - | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1490 | 1523 | | |
1491 | 1524 | | |
1492 | 1525 | | |
1493 | 1526 | | |
1494 | 1527 | | |
1495 | 1528 | | |
1496 | | - | |
| 1529 | + | |
1497 | 1530 | | |
1498 | 1531 | | |
1499 | 1532 | | |
1500 | 1533 | | |
1501 | 1534 | | |
1502 | | - | |
| 1535 | + | |
1503 | 1536 | | |
1504 | 1537 | | |
1505 | 1538 | | |
| |||
1508 | 1541 | | |
1509 | 1542 | | |
1510 | 1543 | | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
1511 | 1570 | | |
1512 | 1571 | | |
1513 | 1572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
| 938 | + | |
938 | 939 | | |
939 | 940 | | |
940 | 941 | | |
| |||
0 commit comments