]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore/HashIndex: be loud about splits 12421/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Fri, 9 Dec 2016 21:06:26 +0000 (22:06 +0100)
committerDan van der Ster <daniel.vanderster@cern.ch>
Mon, 12 Dec 2016 20:32:31 +0000 (21:32 +0100)
Filestore splits are a rare yet important enough event that an
OSD should visibly report when they happen.

Without this reporting an operator could spend hours trying to
understand the cause of any split-induced slow requests.

Fixes: http://tracker.ceph.com/issues/18235
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
src/os/filestore/HashIndex.cc

index 897f8c4b9a87e3174572401617bc6c11eea6e341..dfe8e0b170008afc9138056267058f8b77555cc1 100644 (file)
@@ -315,6 +315,8 @@ int HashIndex::split_dirs(const vector<string> &path) {
   }
 
   if (must_split(info)) {
+    dout(1) << __func__ << " " << path << " has " << info.objs
+            << " objects, starting split." << dendl;
     r = initiate_split(path, info);
     if (r < 0) {
       dout(10) << "error initiating split on " << path << ": "
@@ -323,6 +325,8 @@ int HashIndex::split_dirs(const vector<string> &path) {
     }
 
     r = complete_split(path, info);
+    dout(1) << __func__ << " " << path << " split completed."
+            << dendl;
     if (r < 0) {
       dout(10) << "error completing split on " << path << ": "
               << cpp_strerror(r) << dendl;
@@ -378,10 +382,15 @@ int HashIndex::_created(const vector<string> &path,
     return r;
 
   if (must_split(info)) {
+    dout(1) << __func__ << " " << path << " has " << info.objs
+            << " objects, starting split." << dendl;
     int r = initiate_split(path, info);
     if (r < 0)
       return r;
-    return complete_split(path, info);
+    r = complete_split(path, info);
+    dout(1) << __func__ << " " << path << " split completed."
+            << dendl;
+    return r;
   } else {
     return 0;
   }