Skip to content

Commit

Permalink
oops, forgot on place that needed RecoveryMmapSize() added. Nice to h…
Browse files Browse the repository at this point in the history
…ave a good code reviewer. Thank you ajs.
  • Loading branch information
MatthewVon committed May 8, 2014
1 parent 41b7bb8 commit 237fcfe
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions db/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,9 @@ Status BuildTable(const std::string& dbname,
std::string fname = TableFileName(options, meta->number, meta->level);
if (iter->Valid()) {
WritableFile* file;
size_t map_size;

// large buffers, try for a little bit bigger than half hoping
// for two writes ... not three
if (10*1024*1024 < options.write_buffer_size)
map_size=(options.write_buffer_size/6)*4;
else
map_size=(options.write_buffer_size*12)/10; // integer multiply 1.2

s = env->NewWritableFile(fname, &file, map_size);
s = env->NewWritableFile(fname, &file,
env->RecoveryMmapSize(&options));
if (!s.ok()) {
return s;
}
Expand Down

1 comment on commit 237fcfe

@andrewjstone
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again @matthewvon lucks out with me wanting to do a small review after a 3 day project. Glad I could help.

Please sign in to comment.