mitzen / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

db/db_bench ignores --open_files #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Look at the source for db/db_bench.cc. The value of FLAGS_open_files is never 
assigned to options.max_open_files. Instrumenting the LRU cache code also shows 
that the cache capacity was always 1000.

This is with LevelDB 1.5.0

grep open_files ~/leveldb-1.5.0/db/db_bench.cc 

static int FLAGS_open_files = 0;
  FLAGS_open_files = leveldb::Options().max_open_files;
    } else if (sscanf(argv[i], "--open_files=%d%c", &n, &junk) == 1) {
      FLAGS_open_files = n;

Original issue reported on code.google.com by mdcal...@gmail.com on 14 Sep 2012 at 11:25

GoogleCodeExporter commented 9 years ago
Thanks for pointing that out.  The problem should be fixed in the next release. 
If you need a quicker solution, just adding the following line to db_bench's 
Open() should do the trick:
    options.max_open_files = FLAGS_open_files;

Original comment by san...@google.com on 14 Sep 2012 at 11:39

GoogleCodeExporter commented 9 years ago
Fixed in 1.6.0

Original comment by san...@google.com on 12 Oct 2012 at 8:02