OPTION(osd_failsafe_full_ratio, OPT_FLOAT, .97) // what % full makes an OSD "full" (failsafe)
OPTION(osd_failsafe_nearfull_ratio, OPT_FLOAT, .90) // what % full makes an OSD near full (failsafe)
+OPTION(osd_pg_object_context_cache_count, OPT_INT, 64)
+
// determines whether PGLog::check() compares written out log to stored log
OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false)
pgbackend(
PGBackend::build_pg_backend(
_pool.info, curmap, this, coll_t(p), coll_t::make_temp_coll(p), o->store, cct)),
+ object_contexts(o->cct, g_conf->osd_pg_object_context_cache_count),
snapset_contexts_lock("ReplicatedPG::snapset_contexts"),
temp_seq(0),
snap_trimmer_machine(this)
}
hit_set_setup();
agent_setup();
+ if (get_role() !=0) {
+ object_contexts.clear();
+ }
}
// clear state. called on recovery completion AND cancellation.
friend struct C_OnPushCommit;
// projected object info
- SharedPtrRegistry<hobject_t, ObjectContext> object_contexts;
+ SharedLRU<hobject_t, ObjectContext> object_contexts;
// map from oid.snapdir() to SnapSetContext *
map<hobject_t, SnapSetContext*> snapset_contexts;
Mutex snapset_contexts_lock;