File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22name = " fjall"
33description = " Log-structured, embeddable key-value storage engine"
44license = " MIT OR Apache-2.0"
5- version = " 2.11.0 "
5+ version = " 2.11.1 "
66edition = " 2021"
77rust-version = " 1.76.0"
88readme = " README.md"
@@ -28,7 +28,7 @@ __internal_whitebox = []
2828[dependencies ]
2929byteorder = " 1.5.0"
3030byteview = " 0.6.1"
31- lsm-tree = { version = " ~2.10" , default-features = false , features = [] }
31+ lsm-tree = { version = " ~2.10.1 " , default-features = false , features = [] }
3232log = " 0.4.21"
3333std-semaphore = " 0.1.0"
3434tempfile = " 3.10.1"
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ pub fn recover_journals<P: AsRef<Path>>(path: P) -> crate::Result<RecoveryResult
2121 let mut max_journal_id: JournalId = 0 ;
2222 let mut journal_fragments = Vec :: < ( JournalId , PathBuf ) > :: new ( ) ;
2323
24- log:: warn!( "{journal_fragments:?}" ) ;
25-
2624 for dirent in std:: fs:: read_dir ( path) ? {
2725 let dirent = dirent?;
2826 let path = dirent. path ( ) ;
@@ -40,7 +38,10 @@ pub fn recover_journals<P: AsRef<Path>>(path: P) -> crate::Result<RecoveryResult
4038 . strip_suffix ( ".sealed" ) // TODO: 3.0.0 remove in V3
4139 . unwrap_or ( filename)
4240 . parse :: < JournalId > ( )
43- . expect ( "should be valid journal ID" ) ;
41+ . inspect_err ( |e| {
42+ log:: error!( "found an invalid journal file name {filename:?}: {e:?}" ) ;
43+ } )
44+ . expect ( "should be a valid journal file name" ) ;
4445
4546 max_journal_id = max_journal_id. max ( journal_id) ;
4647
@@ -50,6 +51,8 @@ pub fn recover_journals<P: AsRef<Path>>(path: P) -> crate::Result<RecoveryResult
5051 // NOTE: Sort ascending, so the last item is the active journal
5152 journal_fragments. sort_by ( |( a, _) , ( b, _) | a. cmp ( b) ) ;
5253
54+ log:: trace!( "Recovered {journal_fragments:#?}" ) ;
55+
5356 Ok ( match journal_fragments. pop ( ) {
5457 Some ( ( _, active) ) => RecoveryResult {
5558 active : Journal :: from_file ( active) ?,
You can’t perform that action at this time.
0 commit comments