Skip to content

Commit 4e2b771

Browse files
authored
Merge pull request ceph#63215 from athanatos/sjust/wip-cancel-pglog-recovery-70337
crimson/osd/pg_recovery: only reset_pglog_based_recovery_op if complete Reviewed-by: Matan Breizman <[email protected]>
2 parents 53e3248 + c95509e commit 4e2b771

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/crimson/osd/pg_recovery.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ PGRecovery::start_recovery_ops(
8080
ceph_assert(pg->is_recovering());
8181
ceph_assert(!pg->is_backfilling());
8282

83-
// move to unnamed placeholder when C++ 26 is available
84-
auto reset_pglog_based_recovery_op = seastar::defer([this] {
85-
pg->reset_pglog_based_recovery_op();
86-
});
87-
8883
if (!pg->get_peering_state().needs_recovery()) {
8984
if (pg->get_peering_state().needs_backfill()) {
9085
request_backfill();
9186
} else {
9287
all_replicas_recovered();
9388
}
89+
/* TODO: this is racy -- it's possible for a DeferRecovery
90+
* event to be processed between this call and when the
91+
* async RequestBackfill or AllReplicasRecovered events
92+
* are processed -- see https://tracker.ceph.com/issues/71267 */
93+
pg->reset_pglog_based_recovery_op();
9494
co_return seastar::stop_iteration::yes;
9595
}
9696
co_return seastar::stop_iteration::no;

0 commit comments

Comments
 (0)