Skip to content

Commit

Permalink
use a smaller journal file rotation threshold for 32 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
dwight committed Feb 4, 2011
1 parent e3760e4 commit 7ea3b35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions db/dur_journalimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ namespace mongo {
void cleanup();

private:
// rotate after reaching this data size in a journal (j._<n>) file
static const unsigned long long DataLimit = 1 * 1024 * 1024 * 1024;
// Rotate after reaching this data size in a journal (j._<n>) file
// We use a smaller size for 32 bit as the journal is mmapped during recovery (only)
// Note if you take a set of datafiles, including journal files, from 32->64 or vice-versa, it must
// work. (and should as-is)
static const unsigned long long DataLimit = (sizeof(void*)==4) ? 256 * 1024 * 1024 : 1 * 1024 * 1024 * 1024;

/** open a journal file to journal operations to. */
void open();
Expand Down

0 comments on commit 7ea3b35

Please sign in to comment.