Raw compaction is confined to this disposable fixture, after the supported repository handle and all transactions have closed. Never a live migration.
(root: &Path)
| 58 | // Raw compaction is confined to this disposable fixture, after the supported |
| 59 | // repository handle and all transactions have closed. Never a live migration. |
| 60 | fn compacted_bytes(root: &Path) -> u64 { |
| 61 | let path = root.join(".atomic/atomic.redb"); |
| 62 | let mut db = redb::Database::open(&path).unwrap(); |
| 63 | db.compact().unwrap(); |
| 64 | drop(db); |
| 65 | std::fs::metadata(path).unwrap().len() |
| 66 | } |
| 67 | |
| 68 | #[test] |
| 69 | fn small_native_edits_keep_span_graph_rows_constant_and_database_growth_bounded() { |