]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: orphan, fix truncated detection
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 5 May 2015 00:02:29 +0000 (17:02 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 29 Jun 2015 22:09:02 +0000 (15:09 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_orphan.cc

index 7a23a040add30c8fa4853c8d2ed0b4df4d063959..d048cf6b7330d56efd64be65e13a37e07f5687ca 100644 (file)
@@ -127,9 +127,13 @@ int RGWOrphanStore::store_entries(const string& oid, const map<string, bufferlis
   librados::ObjectWriteOperation op;
   op.omap_set(entries);
   cout << "storing " << entries.size() << " entries at " << oid << std::endl;
+  ldout(store->ctx(), 20) << "storing " << entries.size() << " entries at " << oid << ": " << dendl;
+  for (map<string, bufferlist>::const_iterator iter = entries.begin(); iter != entries.end(); ++iter) {
+    ldout(store->ctx(), 20) << " > " << iter->first << dendl;
+  }
   int ret = ioctx.operate(oid, &op);
   if (ret < 0) {
-    cerr << "ERROR: " << __func__ << "(" << oid << ") returned ret=" << ret << std::endl;
+    lderr(store->ctx()) << "ERROR: " << __func__ << "(" << oid << ") returned ret=" << ret << dendl;
   }
   
   return 0;
@@ -143,7 +147,7 @@ int RGWOrphanStore::read_entries(const string& oid, const string& marker, map<st
     cerr << "ERROR: " << __func__ << "(" << oid << ") returned ret=" << ret << std::endl;
   }
 
-  *truncated = (entries->size() < MAX_OMAP_GET);
+  *truncated = (entries->size() == MAX_OMAP_GET);
 
   return 0;
 }