Commit f5144b8
authored
feat: version 2 catalog serialization (#26183)
This introduces a new version for the catalog file formats ([snapshot](https://github.com/influxdata/influxdb/blob/3b57682214a912d8257bfb96d8efb7cb6b6f7e12/influxdb3_catalog/src/snapshot/versions/mod.rs#L2) files and [log](https://github.com/influxdata/influxdb/blob/3b57682214a912d8257bfb96d8efb7cb6b6f7e12/influxdb3_catalog/src/log/versions/mod.rs#L2) files). The reason for introducing a new version is to change the serialization/deserialization format from [`bitcode`](https://docs.rs/bitcode/latest/bitcode/) to JSON. See #26180.
The approach taken was to copy the existing type definitions for both log and snapshot files into two places: a `v1` module and a `v2` module. Going forward:
* Types defined in `v1` should not be changed. They are only there to enable deserialization of existing bitcode-serialized catalog files.
* Types defined in `v2` can be modified in a backward-compatible manor, and new types can be added to the `v2` modules
With this PR, old files are not overwritten. The server does not migrate any files on startup. See #26183 (comment)
Closes #261801 parent f456fd4 commit f5144b8
12 files changed
Lines changed: 3439 additions & 1399 deletions
File tree
- influxdb3_catalog/src
- log
- versions
- v1
- snapshot/versions
- v1
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments