]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
KeyValueStore: Make clone error message more friendly
authorHaomai Wang <haomaiwang@gmail.com>
Mon, 13 Oct 2014 02:14:25 +0000 (10:14 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Mon, 13 Oct 2014 02:14:47 +0000 (10:14 +0800)
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/os/KeyValueStore.cc

index 0f8c4f72768239db6c3723e9d1ac911faf9a40a7..daa8b059bcae3b4ddfd5e5bea3d38ae9383ecde3 100644 (file)
@@ -1514,22 +1514,19 @@ unsigned KeyValueStore::_do_transaction(Transaction& transaction,
     if (r < 0) {
       bool ok = false;
 
-      if (r == -ENOENT && !(op == Transaction::OP_CLONERANGE ||
-                            op == Transaction::OP_CLONE ||
-                            op == Transaction::OP_CLONERANGE2))
-        // -ENOENT is normally okay
-        // ...including on a replayed OP_RMCOLL with checkpoint mode
-        ok = true;
       if (r == -ENODATA)
         ok = true;
 
       if (!ok) {
         const char *msg = "unexpected error code";
 
-        if (r == -ENOENT && (op == Transaction::OP_CLONERANGE ||
-                            op == Transaction::OP_CLONE ||
-                            op == Transaction::OP_CLONERANGE2))
-          msg = "ENOENT on clone suggests osd bug";
+        if (op == Transaction::OP_CLONERANGE ||
+            op == Transaction::OP_CLONE ||
+            op == Transaction::OP_CLONERANGE2) {
+          dout(0) << "BUG: clone failed will lead to paritial transaction applied" << dendl;
+          if (r == -ENOENT)
+            msg = "ENOENT on clone suggests osd bug";
+        }
 
         if (r == -ENOSPC)
           // For now, if we hit _any_ ENOSPC, crash, before we do any damage