-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: use SerdeVecMap in PersistedSnapshot This changes from the use of a HashMap to store the DB -> Table structure in the PersistedSnapshot files to using a SerdeVecMap, which will have the identifiers serialized as integers instead of strings. * test: add a snapshot test for persisted snapshots
- Loading branch information
Showing
3 changed files
with
221 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
..._write/src/snapshots/influxdb3_write__persister__tests__persisted_snapshot_structure.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
source: influxdb3_write/src/persister.rs | ||
expression: snapshot | ||
--- | ||
{ | ||
"host_id": "host", | ||
"next_file_id": 8, | ||
"next_db_id": 2, | ||
"next_table_id": 4, | ||
"next_column_id": 0, | ||
"snapshot_sequence_number": 0, | ||
"wal_file_sequence_number": 0, | ||
"catalog_sequence_number": 0, | ||
"parquet_size_bytes": 1024, | ||
"row_count": 1, | ||
"min_time": 0, | ||
"max_time": 1, | ||
"databases": [ | ||
[ | ||
0, | ||
{ | ||
"tables": [ | ||
[ | ||
0, | ||
[ | ||
{ | ||
"id": 0, | ||
"path": "1.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
}, | ||
{ | ||
"id": 1, | ||
"path": "2.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
} | ||
] | ||
], | ||
[ | ||
1, | ||
[ | ||
{ | ||
"id": 2, | ||
"path": "3.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
}, | ||
{ | ||
"id": 3, | ||
"path": "4.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
} | ||
] | ||
] | ||
] | ||
} | ||
], | ||
[ | ||
1, | ||
{ | ||
"tables": [ | ||
[ | ||
2, | ||
[ | ||
{ | ||
"id": 4, | ||
"path": "5.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
}, | ||
{ | ||
"id": 5, | ||
"path": "6.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
} | ||
] | ||
], | ||
[ | ||
3, | ||
[ | ||
{ | ||
"id": 6, | ||
"path": "7.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
}, | ||
{ | ||
"id": 7, | ||
"path": "8.parquet", | ||
"size_bytes": 1024, | ||
"row_count": 1, | ||
"chunk_time": 0, | ||
"min_time": 0, | ||
"max_time": 1 | ||
} | ||
] | ||
] | ||
] | ||
} | ||
] | ||
] | ||
} |