Skip to content

Commit

Permalink
osd: only remove all the hit set objects on primary osd
Browse files Browse the repository at this point in the history
Only the primary PG is allowed to remove all the hit set objects. And
the PG should be in the active or peered states.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
  • Loading branch information
wonzhq committed Aug 21, 2015
1 parent 5812adb commit fd38902
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/osd/ReplicatedPG.cc
Expand Up @@ -10568,7 +10568,10 @@ void ReplicatedPG::hit_set_setup()
!pool.info.hit_set_period ||
pool.info.hit_set_params.get_type() == HitSet::TYPE_NONE) {
hit_set_clear();
hit_set_remove_all();
// only primary is allowed to remove all the hit set objects
if (is_primary() && is_peered()) {
hit_set_remove_all();
}
return;
}

Expand Down

0 comments on commit fd38902

Please sign in to comment.