Skip to content

Commit

Permalink
osd/ReplicatedBackend: reset thread heartbeat after every omap entry …
Browse files Browse the repository at this point in the history
…in deep-scrub

Doing this every 100 entries could be after 100MB of reads. There's
little cost to reset this, so remove the option for configuring it.

This reduces the likelihood of crashing the osd due to too many omap
values on an object.

Fixes: http://tracker.ceph.com/issues/20375
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
jdurgin committed Jun 21, 2017
1 parent b8a9ee8 commit 15ce608
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/common/config_opts.h
Expand Up @@ -853,7 +853,6 @@ OPTION(osd_deep_scrub_interval, OPT_FLOAT, 60*60*24*7) // once a week
OPTION(osd_deep_scrub_randomize_ratio, OPT_FLOAT, 0.15) // scrubs will randomly become deep scrubs at this rate (0.15 -> 15% of scrubs are deep)
OPTION(osd_deep_scrub_stride, OPT_INT, 524288)
OPTION(osd_deep_scrub_update_digest_min_age, OPT_INT, 2*60*60) // objects must be this old (seconds) before we update the whole-object digest on scrub
OPTION(osd_scan_list_ping_tp_interval, OPT_U64, 100)
OPTION(osd_class_dir, OPT_STR, CEPH_LIBDIR "/rados-classes") // where rados plugins are stored
OPTION(osd_open_classes_on_start, OPT_BOOL, true)
OPTION(osd_class_load_list, OPT_STR, "cephfs hello journal lock log numops "
Expand Down
7 changes: 1 addition & 6 deletions src/osd/ReplicatedBackend.cc
Expand Up @@ -770,14 +770,9 @@ void ReplicatedBackend::be_deep_scrub(
ghobject_t(
poid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard));
assert(iter);
uint64_t keys_scanned = 0;
for (iter->seek_to_first(); iter->status() == 0 && iter->valid();
iter->next(false)) {
if (cct->_conf->osd_scan_list_ping_tp_interval &&
(keys_scanned % cct->_conf->osd_scan_list_ping_tp_interval == 0)) {
handle.reset_tp_timeout();
}
++keys_scanned;
handle.reset_tp_timeout();

dout(25) << "CRC key " << iter->key() << " value:\n";
iter->value().hexdump(*_dout);
Expand Down

0 comments on commit 15ce608

Please sign in to comment.