| 49 | /// `(snapshot_bytes, schema_hlc)` suitable for `import_snapshot` calls. |
| 50 | #[allow(dead_code)] |
| 51 | pub fn build_schema_snapshot(array_name: &str) -> (Vec<u8>, Hlc) { |
| 52 | let hlc_gen = HlcGenerator::new(rep(1)); |
| 53 | let schema = simple_schema(array_name); |
| 54 | let doc = SchemaDoc::from_schema(rep(1), &schema, &hlc_gen).expect("from_schema"); |
| 55 | let bytes = doc.export_snapshot().expect("export_snapshot"); |
| 56 | (bytes, doc.schema_hlc()) |
| 57 | } |
| 58 | |
| 59 | /// Import a pre-built snapshot on `shared`. Use this with a single |
| 60 | /// `(bytes, schema_hlc)` tuple shared across all nodes so every replica |