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: put strings in mempool #12651
Conversation
subsumes #12290 |
95bebc9
to
bea7c6d
Compare
Need rebase |
bea7c6d
to
54584bd
Compare
@@ -21,7 +21,7 @@ | |||
|
|||
#include "KStore.h" | |||
#include "osd/osd_types.h" | |||
#include "kv.h" | |||
#include "os/bluestore/kv.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to have kv.h at 'os' subfolder level to avoid cross-referencing between store implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
#else | ||
# error wtf | ||
#endif | ||
key->append((char*)&bu, 4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace 4 with sizeof(bu) here and below?
@@ -56,7 +56,13 @@ class KeyValueDB { | |||
const std::string &k, ///< [in] Key to set | |||
const bufferlist &bl ///< [in] Value to set | |||
) = 0; | |||
|
|||
virtual void set( | |||
const std::string &prefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would be better to get rid of prefix+key split in the KeyValueDB::TransactionImpl interface and use single full key parameter for all functions. And force the client to create that full key from prefix+subkey via specific 'make_key' member function(s)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Let's do that with a separate changeset, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
54584bd
to
48d7737
Compare
This fails the mempool UT
|
@liewegas - any feedback on my previous comments in this PR? |
Hmm, unit test passes for me. :/ |
48d7737
to
65cbb11
Compare
@@ -1,13 +1,15 @@ | |||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | |||
// vim: ts=8 sw=2 smarttab | |||
|
|||
#include "kv.h" | |||
#ifndef CEPH_OS_BLUESTORE_KV_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CEPH_OS_BLUESTORE_KV_H -> CEPH_OS_KV_H
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except a nit in kv.,h
65cbb11
to
65c4f96
Compare
Signed-off-by: Allen Samuels <allen.samuels@sandisk.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
This creates an intermediate string, which is a waste. Signed-off-by: Sage Weil <sage@redhat.com>
This is a pain in the butt because std::string and std::basic_string<...,custom allocator> are incompatible. Signed-off-by: Sage Weil <sage@redhat.com>
65c4f96
to
c0e12bf
Compare
This adds string support to mempool, and then moves a few bluestore strings
into the blustore_meta_other pool. I don't think there are any remaining
strings of interest.