This commit is contained in:
TcMits
2025-09-14 19:03:09 +07:00
parent a658273c63
commit 4bb6b02b65
2 changed files with 3 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ impl CheckpointResult {
}
}
#[derive(Debug, Copy, Clone, Default, EnumString)]
#[derive(Debug, Copy, Clone, EnumString)]
#[strum(ascii_case_insensitive)]
pub enum CheckpointMode {
/// Checkpoint as many frames as possible without waiting for any database readers or writers to finish, then sync the database file if all frames in the log were checkpointed.
@@ -73,7 +73,6 @@ pub enum CheckpointMode {
/// Optional upper_bound_inclusive parameter can be set in order to checkpoint frames with number no larger than the parameter
Passive { upper_bound_inclusive: Option<u64> },
/// This mode blocks until there is no database writer and all readers are reading from the most recent database snapshot. It then checkpoints all frames in the log file and syncs the database file. This mode blocks new database writers while it is pending, but new database readers are allowed to continue unimpeded.
#[default]
Full,
/// This mode works the same way as `Full` with the addition that after checkpointing the log file it blocks (calls the busy-handler callback) until all readers are reading from the database file only. This ensures that the next writer will restart the log file from the beginning. Like `Full`, this mode blocks new database writer attempts while it is pending, but does not impede readers.
Restart,

View File

@@ -42,12 +42,13 @@ pub fn derive_description_from_doc(item: TokenStream) -> TokenStream {
TokenTree::Ident(ident) => {
// Capture the enum variant name and associate it with its description
let ident_str = ident.to_string();
// this is a quick fix for derive(EnumDiscriminants)
if ident_str == "strum_discriminants" {
continue;
}
// this is a quick fix for
// this is a quick fix for repr
if ident_str == "repr" {
continue;
}