From d5e6b184cd5828de1aeedb900cc6419d37f928da Mon Sep 17 00:00:00 2001 From: dwight Date: Fri, 24 Dec 2010 11:10:13 -0500 Subject: [PATCH] fix size of lsnfile didnt change on the last revision --- db/dur_journal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/dur_journal.cpp b/db/dur_journal.cpp index b34ed541732..cb3ecd43d26 100644 --- a/db/dur_journal.cpp +++ b/db/dur_journal.cpp @@ -43,6 +43,7 @@ namespace mongo { BOOST_STATIC_ASSERT( sizeof(JSectHeader) == 12 ); BOOST_STATIC_ASSERT( sizeof(JSectFooter) == 32 ); BOOST_STATIC_ASSERT( sizeof(JEntry) == 12 ); + BOOST_STATIC_ASSERT( sizeof(LSNFile) == 88 ); filesystem::path getJournalDir() { filesystem::path p(dbpath); @@ -287,7 +288,7 @@ namespace mongo { // os can flush as it likes. if it flushes slowly, we will just do extra work on recovery. // however, given we actually close the file, that seems unlikely. MemoryMappedFile f; - unsigned long long length = 8; + unsigned long long length = sizeof(LSNFile); LSNFile *lsnf = static_cast( f.map(lsnPath().string().c_str(), length) ); assert(lsnf); lsnf->set(lsn);