OPTION(osd_fast_shutdown, OPT_BOOL)
OPTION(osd_fast_shutdown_notify_mon, OPT_BOOL) // tell mon the OSD is shutting down on osd_fast_shutdown
OPTION(osd_fast_fail_on_connection_refused, OPT_BOOL) // immediately mark OSDs as down once they refuse to accept connections
-OPTION(osd_rocksdb_iterator_bounds_enabled, OPT_BOOL) // whether omap iterator bounds are applied to rocksdb iterator ReadOptions
OPTION(osd_pg_object_context_cache_count, OPT_INT)
OPTION(osd_tracing, OPT_BOOL) // true if LTTng-UST tracepoints should be enabled
.set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next removal transaction when data is on HDD and journal is on SSD"),
- Option("osd_rocksdb_iterator_bounds_enabled", Option::TYPE_BOOL, Option::LEVEL_DEV)
- .set_default(true)
- .set_description("Whether omap iterator bounds are applied to rocksdb iterator ReadOptions"),
-
Option("osd_failsafe_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(.97)
.set_description(""),
iterate_upper_bound(make_slice(bounds.upper_bound))
{
auto options = rocksdb::ReadOptions();
- if (db->cct->_conf->osd_rocksdb_iterator_bounds_enabled) {
- if (bounds.lower_bound) {
- options.iterate_lower_bound = &iterate_lower_bound;
- }
- if (bounds.upper_bound) {
- options.iterate_upper_bound = &iterate_upper_bound;
- }
+ if (bounds.lower_bound) {
+ options.iterate_lower_bound = &iterate_lower_bound;
+ }
+ if (bounds.upper_bound) {
+ options.iterate_upper_bound = &iterate_upper_bound;
}
dbiter = db->db->NewIterator(options, cf);
}
{
iters.reserve(shards.size());
auto options = rocksdb::ReadOptions();
- if (db->cct->_conf->osd_rocksdb_iterator_bounds_enabled) {
- if (bounds.lower_bound) {
- options.iterate_lower_bound = &iterate_lower_bound;
- }
- if (bounds.upper_bound) {
- options.iterate_upper_bound = &iterate_upper_bound;
- }
+ if (bounds.lower_bound) {
+ options.iterate_lower_bound = &iterate_lower_bound;
+ }
+ if (bounds.upper_bound) {
+ options.iterate_upper_bound = &iterate_upper_bound;
}
for (auto& s : shards) {
iters.push_back(db->db->NewIterator(options, s));
rocksdb::ColumnFamilyHandle* cf = nullptr;
if (cf_it->second.handles.size() == 1) {
cf = cf_it->second.handles[0];
- } else if (cct->_conf->osd_rocksdb_iterator_bounds_enabled) {
+ } else {
cf = get_cf_handle(prefix, bounds);
}
if (cf) {
rocksdb::ReadOptions options = rocksdb::ReadOptions();
if (opts & ITERATOR_NOCACHE)
options.fill_cache=false;
- if (db->cct->_conf->osd_rocksdb_iterator_bounds_enabled) {
- if (bounds.lower_bound) {
- options.iterate_lower_bound = &iterate_lower_bound;
- }
- if (bounds.upper_bound) {
- options.iterate_upper_bound = &iterate_upper_bound;
- }
+ if (bounds.lower_bound) {
+ options.iterate_lower_bound = &iterate_lower_bound;
+ }
+ if (bounds.upper_bound) {
+ options.iterate_upper_bound = &iterate_upper_bound;
}
dbiter = db->db->NewIterator(options, cf);
}
string head, tail;
o->get_omap_header(&head);
o->get_omap_tail(&tail);
- KeyValueDB::Iterator it = db->get_iterator(prefix, 0, KeyValueDB::IteratorBounds{head, tail});
+ auto bounds = KeyValueDB::IteratorBounds();
+ bounds.lower_bound = head;
+ bounds.upper_bound = tail;
+ KeyValueDB::Iterator it = db->get_iterator(prefix, 0, std::move(bounds));
it->lower_bound(head);
while (it->valid()) {
if (it->key() == head) {
string head, tail;
o->get_omap_key(string(), &head);
o->get_omap_tail(&tail);
- KeyValueDB::Iterator it = db->get_iterator(prefix, 0, KeyValueDB::IteratorBounds{head, tail});
+ auto bounds = KeyValueDB::IteratorBounds();
+ bounds.lower_bound = head;
+ bounds.upper_bound = tail;
+ KeyValueDB::Iterator it = db->get_iterator(prefix, 0, std::move(bounds));
it->lower_bound(head);
while (it->valid()) {
if (it->key() >= tail) {
string head, tail;
oldo->get_omap_header(&head);
oldo->get_omap_tail(&tail);
- KeyValueDB::Iterator it = db->get_iterator(prefix, 0, KeyValueDB::IteratorBounds{head, tail});
+ auto bounds = KeyValueDB::IteratorBounds();
+ bounds.lower_bound = head;
+ bounds.upper_bound = tail;
+ KeyValueDB::Iterator it = db->get_iterator(prefix, 0, std::move(bounds));
it->lower_bound(head);
while (it->valid()) {
if (it->key() >= tail) {