Reformat / cleanup
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
namespace ZB.MOM.WW.CBDD.Core.Transactions;
|
||||
|
||||
namespace ZB.MOM.WW.CBDD.Core.Transactions;
|
||||
|
||||
/// <summary>
|
||||
/// Defines checkpoint modes for WAL (Write-Ahead Log) checkpointing.
|
||||
/// Similar to SQLite's checkpoint strategies.
|
||||
/// Defines checkpoint modes for WAL (Write-Ahead Log) checkpointing.
|
||||
/// Similar to SQLite's checkpoint strategies.
|
||||
/// </summary>
|
||||
public enum CheckpointMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Passive checkpoint: non-blocking, best-effort transfer from WAL to database.
|
||||
/// If the checkpoint lock is busy, the operation is skipped.
|
||||
/// WAL content is preserved and a checkpoint marker is appended when work is applied.
|
||||
/// Passive checkpoint: non-blocking, best-effort transfer from WAL to database.
|
||||
/// If the checkpoint lock is busy, the operation is skipped.
|
||||
/// WAL content is preserved and a checkpoint marker is appended when work is applied.
|
||||
/// </summary>
|
||||
Passive = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Full checkpoint: waits for the checkpoint lock, transfers committed pages to
|
||||
/// the page file, and preserves WAL content by appending a checkpoint marker.
|
||||
/// Full checkpoint: waits for the checkpoint lock, transfers committed pages to
|
||||
/// the page file, and preserves WAL content by appending a checkpoint marker.
|
||||
/// </summary>
|
||||
Full = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Truncate checkpoint: same as <see cref="Full"/> but truncates WAL after
|
||||
/// successfully applying committed pages. Use this to reclaim disk space.
|
||||
/// Truncate checkpoint: same as <see cref="Full" /> but truncates WAL after
|
||||
/// successfully applying committed pages. Use this to reclaim disk space.
|
||||
/// </summary>
|
||||
Truncate = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Restart checkpoint: same as <see cref="Truncate"/> and then reinitializes
|
||||
/// the WAL stream for a fresh writer session.
|
||||
/// Restart checkpoint: same as <see cref="Truncate" /> and then reinitializes
|
||||
/// the WAL stream for a fresh writer session.
|
||||
/// </summary>
|
||||
Restart = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Result of a checkpoint execution.
|
||||
/// Result of a checkpoint execution.
|
||||
/// </summary>
|
||||
/// <param name="Mode">Requested checkpoint mode.</param>
|
||||
/// <param name="Executed">True when checkpoint logic ran; false when skipped (for passive mode contention).</param>
|
||||
@@ -49,4 +49,4 @@ public readonly record struct CheckpointResult(
|
||||
long WalBytesBefore,
|
||||
long WalBytesAfter,
|
||||
bool Truncated,
|
||||
bool Restarted);
|
||||
bool Restarted);
|
||||
Reference in New Issue
Block a user