]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedBackend::handle_pull_response: use list<ObjectContextRef>
authorSamuel Just <sam.just@inktank.com>
Tue, 24 Sep 2013 23:23:39 +0000 (16:23 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 26 Sep 2013 18:24:28 +0000 (11:24 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedBackend.h
src/osd/ReplicatedPG.cc

index af8b3e291b60c9486d2e8765457af4059996de9a..e34e55a618e17abc9d68c4d45527b128badc653a 100644 (file)
@@ -230,7 +230,7 @@ private:
   void handle_pull(int peer, PullOp &op, PushOp *reply);
   bool handle_pull_response(
     int from, PushOp &op, PullOp *response,
-    list<pair<hobject_t, ObjectContextRef> > *to_continue,
+    list<ObjectContextRef> *to_continue,
     ObjectStore::Transaction *t);
   void handle_push(int from, PushOp &op, PushReplyOp *response,
                   ObjectStore::Transaction *t);
index f1155a0f897e1cfc626894244b10f171c1b6e96b..fe22b22e2cbb2d571d528fe5ab69f954cad58c5a 100644 (file)
@@ -1603,20 +1603,20 @@ void ReplicatedBackend::_do_push(OpRequestRef op)
 
 struct C_ReplicatedBackend_OnPullComplete : GenContext<ThreadPool::TPHandle&> {
   ReplicatedBackend *bc;
-  list<pair<hobject_t, ObjectContextRef> > to_continue;
+  list<ObjectContextRef> to_continue;
   int priority;
   C_ReplicatedBackend_OnPullComplete(ReplicatedBackend *bc, int priority)
     : bc(bc), priority(priority) {}
 
   void finish(ThreadPool::TPHandle &handle) {
     ReplicatedBackend::RPGHandle *h = bc->_open_recovery_op();
-    for (list<pair<hobject_t, ObjectContextRef> >::iterator i =
+    for (list<ObjectContextRef>::iterator i =
           to_continue.begin();
         i != to_continue.end();
         ++i) {
-      if (!bc->start_pushes(i->first, i->second, h)) {
+      if (!bc->start_pushes((*i)->obs.oi.soid, *i, h)) {
        bc->get_parent()->on_global_recover(
-         i->first);
+         (*i)->obs.oi.soid);
       }
       handle.reset_tp_timeout();
     }
@@ -1632,7 +1632,7 @@ void ReplicatedBackend::_do_pull_response(OpRequestRef op)
 
   vector<PullOp> replies(1);
   ObjectStore::Transaction *t = new ObjectStore::Transaction;
-  list<pair<hobject_t, ObjectContextRef> > to_continue;
+  list<ObjectContextRef> to_continue;
   for (vector<PushOp>::iterator i = m->pushes.begin();
        i != m->pushes.end();
        ++i) {
@@ -6311,7 +6311,7 @@ ObjectRecoveryInfo ReplicatedBackend::recalc_subsets(
 
 bool ReplicatedBackend::handle_pull_response(
   int from, PushOp &pop, PullOp *response,
-  list<pair<hobject_t, ObjectContextRef> > *to_continue,
+  list<ObjectContextRef> *to_continue,
   ObjectStore::Transaction *t
   )
 {
@@ -6385,7 +6385,7 @@ bool ReplicatedBackend::handle_pull_response(
   pi.stat.num_keys_recovered += pop.omap_entries.size();
 
   if (complete) {
-    to_continue->push_back(make_pair(hoid, pi.obc));
+    to_continue->push_back(pi.obc);
     pi.stat.num_objects_recovered++;
     get_parent()->on_local_recover(
       hoid, pi.stat, pi.recovery_info, pi.obc, t);
@@ -6978,7 +6978,7 @@ void ReplicatedBackend::sub_op_push(OpRequestRef op)
   if (is_primary()) {
     PullOp resp;
     RPGHandle *h = _open_recovery_op();
-    list<pair<hobject_t, ObjectContextRef> > to_continue;
+    list<ObjectContextRef> to_continue;
     bool more = handle_pull_response(
       m->get_source().num(), pop, &resp,
       &to_continue, t);