Commit 8c19227
committed
osd/PeeringState: handle race condition of DeferBackfill event for Backfilling state
Currently when PG in `Backfilling` state receives a `DeferBackfill`
event, there are cases when that event could race with
`MOSDPGBackfill::OP_BACKFILL_FINISH` becasue the PG has already
finished backfilling. In such case, the following
happens:
1. PG state set to `PG_STATE_BACKFILL_WAIT`
2. Suspend backfilling
3. Discard the event
Notice that we do not reschedule backfill in the above steps, this can
lead to a situation where the PG gets stuck in a `backfill_wait` state
forever. This bug got introduced due to the following commit:
`865839f`: osd/PeeringState: check racing with OP_BACKFILL_FINISH when defering
backfill
PR Link: ceph#60185
This commit, fixes that by making sure that in race conditions such as
above - we only discard the event.
Fixes: https://tracker.ceph.com/issues/71010
Signed-off-by: Naveen Naidu <[email protected]>
(cherry picked from commit b2bd15b)1 parent da27661 commit 8c19227
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5411 | 5411 | | |
5412 | 5412 | | |
5413 | 5413 | | |
5414 | | - | |
5415 | | - | |
5416 | | - | |
5417 | | - | |
5418 | | - | |
5419 | | - | |
5420 | 5414 | | |
| 5415 | + | |
| 5416 | + | |
| 5417 | + | |
| 5418 | + | |
| 5419 | + | |
5421 | 5420 | | |
5422 | 5421 | | |
5423 | 5422 | | |
| |||
5427 | 5426 | | |
5428 | 5427 | | |
5429 | 5428 | | |
| 5429 | + | |
| 5430 | + | |
| 5431 | + | |
5430 | 5432 | | |
5431 | 5433 | | |
5432 | 5434 | | |
| |||
0 commit comments