mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
Merge pull request #44333 from rzarzynski/wip-crimson-fix-recovery-discarding
crimson/osd: implement op discarding for pglog-based recovery. Reviewed-by: Samuel Just <sjust@redhat.com> Reviewed-by: Chunmei Liu <chunmei.liu@intel.com>
This commit is contained in:
commit
85e30b4dfd
@ -592,6 +592,10 @@ RecoveryBackend::interruptible_future<>
|
||||
ReplicatedRecoveryBackend::handle_pull(Ref<MOSDPGPull> m)
|
||||
{
|
||||
logger().debug("{}: {}", __func__, *m);
|
||||
if (pg.can_discard_replica_op(*m)) {
|
||||
logger().debug("{}: discarding {}", __func__, *m);
|
||||
return seastar::now();
|
||||
}
|
||||
return seastar::do_with(m->take_pulls(), [this, from=m->from](auto& pulls) {
|
||||
return interruptor::parallel_for_each(pulls,
|
||||
[this, from](auto& pull_op) {
|
||||
@ -712,6 +716,10 @@ RecoveryBackend::interruptible_future<>
|
||||
ReplicatedRecoveryBackend::handle_pull_response(
|
||||
Ref<MOSDPGPush> m)
|
||||
{
|
||||
if (pg.can_discard_replica_op(*m)) {
|
||||
logger().debug("{}: discarding {}", __func__, *m);
|
||||
return seastar::now();
|
||||
}
|
||||
const PushOp& pop = m->pushes[0]; //TODO: only one push per message for now.
|
||||
if (pop.version == eversion_t()) {
|
||||
// replica doesn't have it!
|
||||
@ -800,6 +808,10 @@ RecoveryBackend::interruptible_future<>
|
||||
ReplicatedRecoveryBackend::handle_push(
|
||||
Ref<MOSDPGPush> m)
|
||||
{
|
||||
if (pg.can_discard_replica_op(*m)) {
|
||||
logger().debug("{}: discarding {}", __func__, *m);
|
||||
return seastar::now();
|
||||
}
|
||||
if (pg.is_primary()) {
|
||||
return handle_pull_response(m);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user