]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Make Configurable/Customizable options copyable (#8704)
authormrambacher <mrambach@gmail.com>
Thu, 26 Aug 2021 00:46:31 +0000 (17:46 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 26 Aug 2021 00:48:08 +0000 (17:48 -0700)
commit6e63e77af1ee93e81b5bcd625cf2353f48b94aee
tree9bb0434b70e6b08ed4a6b7686942ea891fef3589
parentf484a60d1f550a828d5e2480581f844ac524d0eb
Make Configurable/Customizable options copyable (#8704)

Summary:
The atomic variable "is_prepared_" was keeping Configurable objects from being copy-constructed.  Removed the atomic to allow copies.

Since the variable is only changed from false to true (and never back), there is no reason it had to be atomic.

Added tests that simple Configurable and Customizable objects can be put on the stack and copied.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8704

Reviewed By: anand1976

Differential Revision: D30530526

Pulled By: ltamasi

fbshipit-source-id: 4dd4439b3e5ad7fa396573d0b25d9fb709160576
include/rocksdb/configurable.h
options/configurable.cc
options/configurable_test.cc
options/customizable_test.cc
options/options_test.cc