Andrew Kryczka 284aa613a7 Eliminate duplicated property constants
Summary:
Before this diff, there were duplicated constants to refer to properties (user-
facing API had strings and InternalStats had an enum). I noticed these were
inconsistent in terms of which constants are provided, names of constants, and
documentation of constants. Overall it seemed annoying/error-prone to maintain
these duplicated constants.

So, this diff gets rid of InternalStats's constants and replaces them with a map
keyed on the user-facing constant. The value in that map contains a function
pointer to get the property value, so we don't need to do string matching while
holding db->mutex_. This approach has a side benefit of making many small
handler functions rather than a giant switch-statement.

Test Plan: db_properties_test passes, running "make commit-prereq -j32"

Reviewers: sdong, yhchiang, kradhakrishnan, IslamAbdelRahman, rven, anthony

Reviewed By: anthony

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D53253
2016-02-02 19:14:56 -08:00
..
2015-07-17 18:59:11 +02:00
2015-12-11 01:54:48 +09:00
2015-12-29 13:22:13 -08:00
2015-09-17 11:42:56 -07:00
2015-04-23 12:10:36 -07:00
2015-12-11 01:54:48 +09:00
2015-03-17 14:08:00 -07:00
2015-07-07 12:10:10 -07:00
2015-11-24 16:33:09 +03:00
2015-11-24 16:33:09 +03:00
2015-08-05 07:33:27 -07:00
2016-01-06 13:43:22 -08:00
2016-01-11 16:10:48 -08:00
2015-12-28 15:06:34 -08:00
2015-03-17 14:08:00 -07:00
2014-11-10 17:39:38 -05:00
2015-09-17 11:42:56 -07:00
2015-05-29 14:36:35 -07:00