New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/bluestore: fix OnodeSizeTracking testing #12684
os/bluestore: fix OnodeSizeTracking testing #12684
Conversation
@xiexingguo, I'm wondering what commit introduced collections into mempools? Can't find any... |
Both will fail the test in my local testbed. |
It's probably the SharedBlobSet in Collection |
...it doesn't fail for me, though. I think it needs to be a GE? My guess is that some stl libs preallocate the hash table and others don't? Maybe? If do you do a json dump of the mempool with mempool_debug=true we can see what is being allocated. |
Then I think the result of this test case is non-deterministic. In my local test environment it can be --- a/src/test/objectstore/store_test.cc
+++ b/src/test/objectstore/store_test.cc
@@ -5583,12 +5583,23 @@ TEST_P(StoreTest, OnodeSizeTracking) {
g_conf->set_val("bluestore_compression_mode", "none");
g_conf->set_val("bluestore_csum_type", "none");
g_conf->set_val("bluestore_min_alloc_size", stringify(block_size));
+ g_conf->set_val("mempool_debug", "true");
g_ceph_context->_conf->apply_changes(NULL);
int r = store->umount();
ASSERT_EQ(r, 0);
r = store->mount(); //to force min_alloc_size update
ASSERT_EQ(r, 0);
+ {
+ cout <<" mempool dump:\n";
+ JSONFormatter f(true);
+ f.open_object_section("transaction");
+ mempool::dump(&f);
+ f.close_section();
+ f.flush(cout);
+ cout << std::endl;
+ }
+ The result:
|
Since the above output does not show as much detail as we want, I add a new pool, put the coll_map into there and retest as below: --- a/src/include/mempool.h
+++ b/src/include/mempool.h
@@ -146,6 +146,7 @@ namespace mempool {
f(osd) \
f(bluestore_meta_onode) \
f(bluestore_meta_other) \
+ f(bluestore_meta_collmap) \
f(bluestore_alloc) \
f(bluefs)
diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h
index 0bfee14..3908c45 100644
--- a/src/os/bluestore/BlueStore.h
+++ b/src/os/bluestore/BlueStore.h
@@ -1523,7 +1523,7 @@ private:
bool mounted;
RWLock coll_lock; ///< rwlock to protect coll_map
- mempool::bluestore_meta_other::unordered_map<coll_t, CollectionRef> coll_map;
+ mempool::bluestore_meta_collmap::unordered_map<coll_t, CollectionRef> coll_map;
vector<Cache*> cache_shards; The result(again):
|
abb5b57
to
1d97862
Compare
Then this statement has no effect and can be safely removed.. |
[ FAILED ] 1 test, listed below: [ FAILED ] ObjectStore/StoreTest.OnodeSizeTracking/2, where GetParam() = "bluestore" 1 FAILED TEST The above test failure happens as the bluestore mount() process will try to load all collections and put them into the coll_map, which will be also tracked as mempool::bluestore_meta_other. So total_bytes from mempool won't be equal to zero. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
retest this please |
http://tracker.ceph.com/issues/20498
[ FAILED ] 1 test, listed below:
[ FAILED ] ObjectStore/StoreTest.OnodeSizeTracking/2, where GetParam() = "bluestore"
1 FAILED TEST
The above test failure happens as the bluestore mount() process
will try to load all collections and put them into the coll_map,
which will be also tracked as mempool::bluestore_meta_other.
So total_bytes from mempool won't be equal to zero.
Signed-off-by: xie xingguo xie.xingguo@zte.com.cn