} else {
pull(head);
}
- waiting_for_head.insert(poid.oid);
return false;
}
missing_loc.erase(poid.oid);
- if (poid.oid.snap == CEPH_NOSNAP && waiting_for_head.count(poid.oid))
- waiting_for_head.erase(poid.oid);
-
// close out pull op?
if (pulling.count(poid.oid))
pulling.erase(poid.oid);
latest = log.objects[p->first];
assert(latest);
+ pobject_t poid(info.pgid.pool(), 0, latest->oid);
+ pobject_t head = poid;
+ head.oid.snap = CEPH_NOSNAP;
+
dout(10) << "recover_primary "
<< *latest
<< (latest->is_update() ? " (update)":"")
<< (missing.is_missing(latest->oid) ? " (missing)":"")
+ << (missing.is_missing(head.oid) ? " (missing head)":"")
<< (pulling.count(latest->oid) ? " (pulling)":"")
- << (waiting_for_head.count(latest->oid) ? " (waiting for head)":"")
+ << (pulling.count(head.oid) ? " (pulling head)":"")
<< dendl;
assert(latest->is_update());
if (!pulling.count(latest->oid)) {
- if (waiting_for_head.count(latest->oid)) {
+ if (pulling.count(head.oid)) {
++skipped;
} else {
- pobject_t poid(info.pgid.pool(), 0, latest->oid);
-
// is this a clone operation that we can do locally?
if (latest->op == Log::Entry::CLONE) {
- pobject_t head = poid;
- head.oid.snap = CEPH_NOSNAP;
if (missing.is_missing(head.oid) &&
missing.have_old(head.oid) == latest->prior_version) {
dout(10) << "recover_primary cloning " << head << " v" << latest->prior_version
// push/pull
map<object_t, pair<eversion_t, int> > pulling; // which objects are currently being pulled, and from where
map<object_t, set<int> > pushing;
- set<object_t> waiting_for_head;
void calc_head_subsets(SnapSet& snapset, pobject_t head,
Missing& missing,