From fe71e789acdc174a7170ebdc9807efe8358c2818 Mon Sep 17 00:00:00 2001 From: bsbds <69835502+bsbds@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:01:21 +0800 Subject: [PATCH] chore: add a comment to the recover behavior of the curp db Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com> --- crates/curp/src/server/storage/db.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/curp/src/server/storage/db.rs b/crates/curp/src/server/storage/db.rs index f31e29e8a..6d8963508 100644 --- a/crates/curp/src/server/storage/db.rs +++ b/crates/curp/src/server/storage/db.rs @@ -159,6 +159,9 @@ impl StorageApi for DB { impl DB { /// Create a new CURP `DB` + /// + /// WARN: The `recover` method must be called before any call to `put_log_entries`. + /// /// # Errors /// Will return `StorageError` if failed to open the storage #[inline]