mirror of
https://github.com/ceph/ceph
synced 2025-03-05 15:58:41 +00:00
Merge pull request #9894 from gaowanlong/osd_recovery_max_omap_entries_per_chunk
osd: limit omap data in push op Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
commit
38609de1ec
@ -754,6 +754,7 @@ OPTION(osd_recovery_delay_start, OPT_FLOAT, 0)
|
||||
OPTION(osd_recovery_max_active, OPT_U64, 3)
|
||||
OPTION(osd_recovery_max_single_start, OPT_U64, 1)
|
||||
OPTION(osd_recovery_max_chunk, OPT_U64, 8<<20) // max size of push chunk
|
||||
OPTION(osd_recovery_max_omap_entries_per_chunk, OPT_U64, 64000) // max number of omap entries per chunk; 0 to disable limit
|
||||
OPTION(osd_copyfrom_max_chunk, OPT_U64, 8<<20) // max size of a COPYFROM chunk
|
||||
OPTION(osd_push_per_object_cost, OPT_U64, 1000) // push cost per object
|
||||
OPTION(osd_max_push_cost, OPT_U64, 8<<20) // max size of push message
|
||||
|
@ -2008,7 +2008,9 @@ int ReplicatedBackend::build_push_op(const ObjectRecoveryInfo &recovery_info,
|
||||
iter->valid();
|
||||
iter->next(false)) {
|
||||
if (!out_op->omap_entries.empty() &&
|
||||
available <= (iter->key().size() + iter->value().length()))
|
||||
((cct->_conf->osd_recovery_max_omap_entries_per_chunk > 0 &&
|
||||
out_op->omap_entries.size() >= cct->_conf->osd_recovery_max_omap_entries_per_chunk) ||
|
||||
available <= iter->key().size() + iter->value().length()))
|
||||
break;
|
||||
out_op->omap_entries.insert(make_pair(iter->key(), iter->value()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user