mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
fix size of lsnfile didnt change on the last revision
This commit is contained in:
parent
a6bf3b2b61
commit
d5e6b184cd
@ -43,6 +43,7 @@ namespace mongo {
|
|||||||
BOOST_STATIC_ASSERT( sizeof(JSectHeader) == 12 );
|
BOOST_STATIC_ASSERT( sizeof(JSectHeader) == 12 );
|
||||||
BOOST_STATIC_ASSERT( sizeof(JSectFooter) == 32 );
|
BOOST_STATIC_ASSERT( sizeof(JSectFooter) == 32 );
|
||||||
BOOST_STATIC_ASSERT( sizeof(JEntry) == 12 );
|
BOOST_STATIC_ASSERT( sizeof(JEntry) == 12 );
|
||||||
|
BOOST_STATIC_ASSERT( sizeof(LSNFile) == 88 );
|
||||||
|
|
||||||
filesystem::path getJournalDir() {
|
filesystem::path getJournalDir() {
|
||||||
filesystem::path p(dbpath);
|
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.
|
// 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.
|
// however, given we actually close the file, that seems unlikely.
|
||||||
MemoryMappedFile f;
|
MemoryMappedFile f;
|
||||||
unsigned long long length = 8;
|
unsigned long long length = sizeof(LSNFile);
|
||||||
LSNFile *lsnf = static_cast<LSNFile*>( f.map(lsnPath().string().c_str(), length) );
|
LSNFile *lsnf = static_cast<LSNFile*>( f.map(lsnPath().string().c_str(), length) );
|
||||||
assert(lsnf);
|
assert(lsnf);
|
||||||
lsnf->set(lsn);
|
lsnf->set(lsn);
|
||||||
|
Loading…
Reference in New Issue
Block a user