Skip to content

Commit

Permalink
osd: Backfill peers should not be included in the acting set
Browse files Browse the repository at this point in the history
Create actingbackfill in choose_acting()
Use first backfill target as previously
Add asserts to catch inappropriate use of actingbackfill
Use is_acting() in proc_replica_info() because this is before actingbackfill set
Remove backfill_targets from stray_set to prevent purge_strays from removing collection
Can't check is_replica() anymore for backfill operations since a backfill isn't
a replica due to acting set change.

fixes: #5855

Signed-off-by: David Zafman <david.zafman@inktank.com>
  • Loading branch information
David Zafman committed Nov 19, 2013
1 parent 19dbf7b commit 86e4fd4
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 99 deletions.
7 changes: 5 additions & 2 deletions src/osd/OSD.cc
Expand Up @@ -6011,8 +6011,11 @@ void OSD::dispatch_context_transaction(PG::RecoveryCtx &ctx, PG *pg)
bool OSD::compat_must_dispatch_immediately(PG *pg)
{
assert(pg->is_locked());
for (vector<int>::iterator i = pg->acting.begin();
i != pg->acting.end();
vector<int> *tmpacting = &pg->acting;
if (pg->actingbackfill.size() > 0)
tmpacting = &pg->actingbackfill;
for (vector<int>::iterator i = tmpacting->begin();
i != tmpacting->end();
++i) {
if (*i == whoami)
continue;
Expand Down

0 comments on commit 86e4fd4

Please sign in to comment.