]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: ping tphandle between each operation within a transaction
authorSamuel Just <sam.just@inktank.com>
Fri, 13 Sep 2013 22:58:33 +0000 (15:58 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 26 Sep 2013 18:21:15 +0000 (11:21 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/os/FileStore.cc
src/os/FileStore.h

index ac51f95006fdd38cac45bf4329aa11fc7dbfd17f..68a922bc1e059014554c9bf08d4e4dc61584477f 100644 (file)
@@ -1711,7 +1711,7 @@ int FileStore::_do_transactions(
   for (list<Transaction*>::iterator p = tls.begin();
        p != tls.end();
        ++p, trans_num++) {
-    r = _do_transaction(**p, op_seq, trans_num);
+    r = _do_transaction(**p, op_seq, trans_num, handle);
     if (r < 0)
       break;
     if (handle)
@@ -1973,7 +1973,9 @@ int FileStore::_check_replay_guard(int fd, const SequencerPosition& spos)
   }
 }
 
-unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_num)
+unsigned FileStore::_do_transaction(
+  Transaction& t, uint64_t op_seq, int trans_num,
+  ThreadPool::TPHandle *handle)
 {
   dout(10) << "_do_transaction on " << &t << dendl;
 
@@ -1981,6 +1983,9 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n
   
   SequencerPosition spos(op_seq, trans_num, 0);
   while (i.have_op()) {
+    if (handle)
+      handle->reset_tp_timeout();
+
     int op = i.get_op();
     int r = 0;
 
@@ -3918,6 +3923,7 @@ int FileStore::collection_list_partial(coll_t c, hobject_t start,
                                       int min, int max, snapid_t seq,
                                       vector<hobject_t> *ls, hobject_t *next)
 {
+  dout(10) << "collection_list_partial: " << c << dendl;
   Index index;
   int r = get_index(c, &index);
   if (r < 0)
@@ -3929,6 +3935,8 @@ int FileStore::collection_list_partial(coll_t c, hobject_t start,
     assert(!m_filestore_fail_eio || r != -EIO);
     return r;
   }
+  if (ls)
+    dout(20) << "objects: " << *ls << dendl;
   return 0;
 }
 
index 4f58df4d698dc25c65da3194f9466311ef714b15..9ba4a866a4bdf543042879eb7eae9421f126f440 100644 (file)
@@ -329,7 +329,9 @@ public:
   int do_transactions(list<Transaction*> &tls, uint64_t op_seq) {
     return _do_transactions(tls, op_seq, 0);
   }
-  unsigned _do_transaction(Transaction& t, uint64_t op_seq, int trans_num);
+  unsigned _do_transaction(
+    Transaction& t, uint64_t op_seq, int trans_num,
+    ThreadPool::TPHandle *handle);
 
   int queue_transactions(Sequencer *osr, list<Transaction*>& tls,
                         TrackedOpRef op = TrackedOpRef());