rocksdb/options
Zhongyi Xie a703432808 MaxFileSizeForLevel: adjust max_file_size for dynamic level compaction
Summary:
`MutableCFOptions::RefreshDerivedOptions` always assume base level is L1, which is not true when `level_compaction_dynamic_level_bytes=true` and Level based compaction is used.
This PR fixes this by recomputing `max_file_size` at query time (in `MaxFileSizeForLevel`)
Fixes https://github.com/facebook/rocksdb/issues/3229

In master:

```
Level Files Size(MB)
--------------------
  0       14      846
  1        0        0
  2        0        0
  3        0        0
  4        0        0
  5       15      366
  6       11      481
Cumulative compaction: 3.83 GB write, 2.27 GB read
```
In branch:
```
Level Files Size(MB)
--------------------
  0        9      544
  1        0        0
  2        0        0
  3        0        0
  4        0        0
  5        0        0
  6      445      935
Cumulative compaction: 2.91 GB write, 1.46 GB read
```

db_bench command used:
```
./db_bench --benchmarks="fillrandom,deleterandom,fillrandom,levelstats,stats" --statistics -deletes=5000 -db=tmp -compression_type=none --num=20000 -value_size=100000 -level_compaction_dynamic_level_bytes=true -target_file_size_base=2097152 -target_file_size_multiplier=2
```
Closes https://github.com/facebook/rocksdb/pull/3755

Differential Revision: D7721381

Pulled By: miasantreble

fbshipit-source-id: 39afb8503190bac3b466adf9bbf2a9b3655789f8
2018-05-03 16:42:13 -07:00
..
cf_options.cc MaxFileSizeForLevel: adjust max_file_size for dynamic level compaction 2018-05-03 16:42:13 -07:00
cf_options.h MaxFileSizeForLevel: adjust max_file_size for dynamic level compaction 2018-05-03 16:42:13 -07:00
db_options.cc Make DBOption compaction_readahead_size dynamic 2017-11-16 17:57:25 -08:00
db_options.h Make DBOption compaction_readahead_size dynamic 2017-11-16 17:57:25 -08:00
options.cc Level Compaction with TTL 2018-04-02 22:14:28 -07:00
options_helper.cc fix calling SetOptions on deprecated options 2018-04-10 19:02:09 -07:00
options_helper.h fix calling SetOptions on deprecated options 2018-04-10 19:02:09 -07:00
options_parser.cc Comment out unused variables 2018-03-05 13:13:41 -08:00
options_parser.h WritePrepared Txn: Optimize for recoverable state 2017-11-01 17:26:46 -07:00
options_sanity_check.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
options_sanity_check.h Change RocksDB License 2017-07-15 16:11:23 -07:00
options_settable_test.cc Support for Column family specific paths. 2018-04-05 19:58:20 -07:00
options_test.cc RocksDBOptionsParser::Parse()'s ignore_unknown_options argument only ingores options from higher version. 2018-02-22 13:28:12 -08:00