peloton icon indicating copy to clipboard operation
peloton copied to clipboard

Settings refactoring

Open ksaito7 opened this issue 6 years ago • 2 comments

This PR refactors setting stuff in order to enable checkpoint manager to recover setting values. In addition, added some convenient functions.

- Fix Points of SettingsManager

  1. Change All set functions to non-static, and move all set/get functions to public.
  2. Add txn argument into set functions in order that a caller of set functions can manage a necessary transaction by itself.
  3. Add set_default argument into set functions. If this flag argument is true, then the default value is updated in addition to updating the setting value.
  4. Add Reset public function to reset the setting value to default value.
  5. Add UpdateSettingListFromCatalog() public function to update setting values in the manager from catalog for checkpoints.
  6. Add/Modify two catalog management private functions: InsertCatalog(), UpdateCatalog().

- Fix Points of SettingsCatalog

  1. Add SettingsCatalogEntry class to acquire all setting information from catalog
  2. Add GetSettingsCatalogEntry() and GetSettingsCatalogEntries() functions. *These function names are temporary. The permanent names depend on discussion in PR #1414.
  3. Delete other get functions.
  4. Add UpdateSettingValue() function to update a setting value and a default value.

- Related Issues

  1. Issues #1424

ksaito7 avatar Jun 26 '18 18:06 ksaito7

Coverage Status

Coverage decreased (-0.1%) to 76.39% when pulling ebc71addd5bf95063e914335e2c2348e9fd89f7e on ksaito7:settings_refactor into 898219f9fe6e1d2b6901ea3797caac5c93850213 on cmu-db:master.

coveralls avatar Jun 29 '18 02:06 coveralls

This last commit isn't related to this PR directly, but I did it because a part of index names of constraints were weird. (related to #1415 we worked for last time)

ksaito7 avatar Jul 05 '18 16:07 ksaito7