Aaron Gao
cc87075d63
No need to limit to 20 files in UpdateAccumulatedStats() if options.max_open_files=-1
...
Summary:
There is a hardcoded constraint in our statistics collection that prevents reading properties from more than 20 SST files. This means our statistics will be very inaccurate for databases with > 20 files since additional files are just ignored. The purpose of constraining the number of files used is to bound the I/O performed during statistics collection, since these statistics need to be recomputed every time the database reopened.
However, this constraint doesn't take into account the case where option "max_open_files" is -1. In that case, all the file metadata has already been read, so MaybeInitializeFileMetaData() won't incur any I/O cost. so this diff gets rid of the 20-file constraint in case max_open_files == -1.
Test Plan:
write into unit test db/db_properties_test.cc - "ValidateSampleNumber".
We generate 20 files with 2 rows and 10 files with 1 row.
If max_open_files !=-1, the `rocksdb.estimate-num-keys` should be (10*1 + 10*2)/20 * 30 = 45. Otherwise, it should be the ground truth, 50.
{F1089153}
Reviewers: andrewkr
Reviewed By: andrewkr
Subscribers: andrewkr, dhruba, leveldb
Differential Revision: https://reviews.facebook.net/D56253
2016-04-01 16:19:12 -07:00
..
2016-02-22 21:32:19 -08:00
2016-02-22 21:32:19 -08:00
2016-02-22 21:32:19 -08:00
2016-04-01 10:42:39 -07:00
2016-04-01 10:42:39 -07:00
2015-07-17 18:59:11 +02:00
2016-04-01 10:42:39 -07:00
2016-02-24 10:25:38 -08:00
2016-03-14 16:21:54 -07:00
2016-04-01 10:42:39 -07:00
2016-02-22 13:54:58 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-24 19:36:39 -07:00
2016-03-24 19:36:39 -07:00
2016-02-09 15:12:00 -08:00
2016-02-17 15:20:23 -08:00
2016-03-24 19:36:39 -07:00
2016-02-17 15:20:23 -08:00
2016-03-31 17:12:18 -07:00
2016-03-02 21:23:28 -08:00
2016-03-08 16:46:41 -08:00
2016-03-24 19:36:39 -07:00
2016-03-24 19:36:39 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-15 12:17:40 -07:00
2016-03-31 17:12:18 -07:00
2016-03-31 17:12:18 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-02 16:23:59 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 10:42:39 -07:00
2016-03-24 19:39:13 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-31 17:12:18 -07:00
2016-03-02 16:23:59 -08:00
2016-04-01 15:48:55 -07:00
2016-03-02 16:23:59 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 16:19:12 -07:00
2016-02-09 15:12:00 -08:00
2016-03-04 18:15:29 -08:00
2016-04-01 10:42:39 -07:00
2016-03-31 17:12:18 -07:00
2016-02-17 15:20:23 -08:00
2016-03-31 17:12:18 -07:00
2016-03-31 17:12:18 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 15:23:46 -07:00
2016-02-29 12:56:55 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 10:42:39 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-04 18:15:29 -08:00
2016-03-02 16:23:59 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-04 18:15:29 -08:00
2016-03-04 18:15:29 -08:00
2016-03-10 18:16:21 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-16 22:57:57 +01:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-16 22:57:57 +01:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 15:48:55 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-25 18:29:43 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-18 15:18:42 -07:00
2016-03-30 23:05:22 +05:30
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 10:42:39 -07:00
2016-04-01 10:42:39 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-30 23:05:22 +05:30
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 10:42:39 -07:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-04-01 16:19:12 -07:00
2016-03-24 19:36:39 -07:00
2016-02-09 15:12:00 -08:00
2016-03-30 23:05:22 +05:30
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-03-30 23:05:22 +05:30
2016-02-09 15:12:00 -08:00
2016-04-01 15:23:46 -07:00
2016-02-16 14:04:14 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00
2016-02-09 15:12:00 -08:00