diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-11-21 21:09:52 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-11-21 21:10:07 +0200 |
| commit | 987f0c0374bf8456fe38a1368103133789f74e62 (patch) | |
| tree | 0660049426bf9e71fdb332b46f414a3639467ab9 /log_db/src/common.rs | |
| parent | 34730bbe58b77c7ee3d5e6344846a8a8e6595f17 (diff) | |
Refactor do_maintenance_tasks
Diffstat (limited to 'log_db/src/common.rs')
| -rw-r--r-- | log_db/src/common.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/log_db/src/common.rs b/log_db/src/common.rs index 74bf97f..6fd4c1f 100644 --- a/log_db/src/common.rs +++ b/log_db/src/common.rs @@ -19,11 +19,16 @@ use std::os::windows::fs::MetadataExt; pub const ACTIVE_SYMLINK_FILENAME: &str = "active"; pub const METADATA_FILE_HEADER_SIZE: usize = 24; +pub const METADATA_ROW_LENGTH: usize = 16; pub const EXCL_LOCK_REQUEST_FILENAME: &str = "excl_lock_req"; pub const INIT_LOCK_FILENAME: &str = "init_lock"; pub const DEFAULT_READ_BUF_SIZE: usize = 1024 * 1024; // 1 MB pub const TEST_RESOURCES_DIR: &str = "tests/resources"; +pub fn metadata_filename(num: u16) -> String { + format!("metadata.{}", num) +} + #[derive(Debug, Eq, PartialEq)] pub enum SpecialSequence { RecordSeparator, |
