summaryrefslogtreecommitdiffstats
path: root/src/test/objectstore/test_kv.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* os/kv_test: Fix estimate functionsAdam Kupczyk2023-10-101-6/+16
| | | | | | | | | We need to use random content to estimate DB size. Otherwise, compression will cause DB to be unreasonably small. Fixes: https://tracker.ceph.com/issues/63121 Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
* test/objectstore: drop the MemDB testing from KVTestRadoslaw Zarzynski2022-07-041-2/+2
| | | | Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
* build: Remove LevelDB supportAdam C. Emerson2021-11-011-1/+1
| | | | | | | | | | | | Whereas new LevelDB packages are build with -fno-rtti and break our attempts to compile against them, and whereas LevelDB has been deprecated for some time, with the Ceph team expending great effort to migrating OSDs off of it, let it be therefore removed. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* common: modify 'main()s' to use new argv_to_vec() signatureRonen Friedman2021-08-191-3/+1
| | | | | | | A followup to PR #42820 that modified argv_to_vec() signature (for style and performance). Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
* test: : build without "using namespace std"Kefu Chai2021-08-131-0/+2
| | | | | | | | | | * add "std::" prefix in headers * add "using" declarations in .cc files. so we don't rely on "using namespace std" in one or more included headers. Signed-off-by: Kefu Chai <kchai@redhat.com>
* test/objectstore: Remove unused valueAdam C. Emerson2020-07-171-1/+0
| | | | Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* test/objectstore: group subtests using bracesKefu Chai2020-06-271-16/+29
| | | | | | for better readability Signed-off-by: Kefu Chai <kchai@redhat.com>
* kv/RocksDBStore: Added resharding controlAdam Kupczyk2020-05-141-20/+21
| | | | | | | Added possibility to control batch size and iterator refresh time for resharding process. Replaced getenv() with new control for resharding unittests. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* ceph_test_keyvaluedb: Add tests for reshardingAdam Kupczyk2020-05-141-0/+273
| | | | Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* kv/RocksDBStore: Added proper WholeSpaceIteratorAdam Kupczyk2020-04-171-0/+330
| | | | | | | Added WholeSpaceIterator that properly assembles sharded and unsharded portions of RocksDB database into one consistent iterator. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* os/bluestore: Fixed default sharding definitionAdam Kupczyk2020-04-171-0/+37
| | | | | | Modified recommendation for column families. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* kv/RocksDBStore: add sharding to column families.Adam Kupczyk2020-04-171-11/+107
| | | | | | | Column families (defined by prefix) can now be split into multiple shards. Each shard is a separate column family. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* kv/KeyValueDB: Test for idempotency of open/closeAdam Kupczyk2020-04-101-0/+2
| | | | Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* kv/KeyValueDB: fix estimate_prefix_size()Adam Kupczyk2019-08-231-0/+66
| | | | Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
* test/objectstore: s/Mutex/ceph::mutex/Kefu Chai2019-08-031-1/+0
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* test: do not conditionize on GTEST_HAS_PARAM_TESTKefu Chai2019-05-021-14/+0
| | | | | | value-parameterized is supported on all platforms, so drop this check Signed-off-by: Kefu Chai <kchai@redhat.com>
* test: s/INSTANTIATE_TEST_CASE_P/INSTANTIATE_TEST_SUITE_P/Kefu Chai2019-05-021-1/+1
| | | | | | the former is deprecated Signed-off-by: Kefu Chai <kchai@redhat.com>
* kv/KeyValueDB: return const char* from MergeOperator::name()Sage Weil2018-08-081-1/+1
| | | | | | | | This avoids a c_str() on a temporary string later down the line, which avoids a use-after-free. Fixes: http://tracker.ceph.com/issues/26875 Signed-off-by: Sage Weil <sage@redhat.com>
* common: move ConfigValues out of md_config_tKefu Chai2018-07-101-5/+5
| | | | | | | | | | | | by moving ConfigValues out of md_config_t, we are able to point md_config_t to a new ConfigValues instance at runtime, without destroying the old one. also remove ConfigReader, because all md_config_obs_t will be updated with ConfigProxy now. as md_config_t is not able to offer the *data* anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
* test: CINIT_FLAG_NO_MON_CONFIG or NO_DEFAULT_CONFIG_FILESage Weil2018-03-061-1/+2
| | | | | | | | | | | | | | | Usually we use NO_DEFAULT_CONFIG_FILE, but for those tests that need the plugin directory overrides in order to work properly when run manually (e.g., "bin/unittest_compression"), read the config and only skip the mon config. The NO_DFEAULT_CONFIG_FILE (which also skips the mon) would work for everything when run via ctest, but as a dev one often runs the unittest manually and having to pass CEPH_LIB=lib is annoying. Note that do_cmake.sh already writes out a trivial ceph.conf with these options set for us. Signed-off-by: Sage Weil <sage@redhat.com>
* drop unnecessary env_to_vec callsSage Weil2018-03-061-1/+0
| | | | | | global[_pre]_init does this for us now. Signed-off-by: Sage Weil <sage@redhat.com>
* kv/RocksDBStore: add CF supportJianjian Huo2017-10-051-1/+159
| | | | | | | | - detect and use existing CFs on open Signed-off-by: Jianjian Huo <jianjian.huo@ssi.samsung.com> Signed-off-by: Adam C. Emerson <aemerson@redhat.com> Signed-off-by: Sage Weil <sage@redhat.com>
* kv/RocksDBStore: implement rm_range_keys operator interface and testHaomai Wang2017-03-261-0/+53
| | | | Signed-off-by: Haomai Wang <haomai@xsky.com>
* osd: add override in osd subsystemliuchang08122017-02-151-6/+6
| | | | | | Fixes: http://tracker.ceph.com/issues/18922 Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
* common: Unskew clockAdam C. Emerson2016-12-221-2/+2
| | | | | | | | In preparation to deglobalizing CephContext, remove the CephContext* parameter to ceph_clock_now() and ceph::real_clock::now() that carries a configurable offset. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* common,test: g_ceph_context->put() upon returnKefu Chai2016-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | prior to this change, global_init() could create a new CephContext and assign it to g_ceph_context. it's our responsibilty to release the CephContext explicitly using cct->put() before the application quits. but sometimes, we fail to do so. in this change, global_init() will return an intrusive_ptr<CephContext>, which calls `g_ceph_context->put()` in its dtor. this ensures that the CephContext is always destroyed before main() returns. so the log is flushed before _log_exp_length is destroyed. there are two cases where global_pre_init() is called directly. - ceph_conf.cc: g_ceph_context->put() will be called by an intrusive_ptr<> deleter. - rgw_main.cc: global_init() is called later on on the success code path, so it will be taken care of. Fixes: http://tracker.ceph.com/issues/17762 Signed-off-by: Kefu Chai <kchai@redhat.com>
* kv: In memory keyvalue db implementationRamesh Chander2016-07-131-2/+34
| | | | Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
* os/bluestore: fix a typo(nonexistant->nonexistent)xie xingguo2016-06-211-1/+1
| | | | Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* kv/KeyValueDB: add merge operator interface and testAllen Samuels2016-04-221-0/+64
| | | | | Signed-off-by: Allen Samuels <allen.samuels@sandisk.com> Signed-off-by: Sage Weil <sage@redhat.com>
* ceph_test_keyvaluedb: clean up test dirSage Weil2016-04-221-5/+14
| | | | | | Just like ceph_test_objectstore Signed-off-by: Sage Weil <sage@redhat.com>
* ceph_test_keyvaluedb: fixup unit test for keyvaluedbAllen Samuels2016-04-221-13/+17
| | | | | Fixes: http://tracker.ceph.com/issues/15435 Signed-off-by: Allen Samuels <allen.samuels@sandisk.com>
* kv: move KeyValueDB from os/ to kv/, libos.a to libkv.aSage Weil2015-10-191-1/+1
| | | | | | | Better code organization, and it will allow us to link less code into the mon. Signed-off-by: Sage Weil <sage@redhat.com>
* ceph_test_keyvaluedb: add simple commit latency benchmarkSage Weil2015-09-011-0/+33
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* ceph_test_keyvaluedb: some simple KeyValueDB unit testsSage Weil2015-09-011-0/+148
Signed-off-by: Sage Weil <sage@redhat.com>