]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: datalog list support --shard-id and --marker 20649/head
authorTianshan Qu <tianshan@xsky.com>
Wed, 28 Feb 2018 17:32:32 +0000 (01:32 +0800)
committerTianshan Qu <tianshan@xsky.com>
Wed, 28 Feb 2018 17:36:32 +0000 (01:36 +0800)
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
src/rgw/rgw_admin.cc

index d7c43cc066230b499643599ccefe5e13ab08c7ba..53b77f3723ac55ed7be97b3258972a303e9be7a2 100644 (file)
@@ -6913,11 +6913,15 @@ next:
       return -ret;
 
     RGWDataChangesLog *log = store->data_log;
-    RGWDataChangesLog::LogMarker marker;
+    RGWDataChangesLog::LogMarker log_marker;
 
     do {
       list<rgw_data_change_log_entry> entries;
-      ret = log->list_entries(start_time.to_real_time(), end_time.to_real_time(), max_entries - count, entries, marker, &truncated);
+      if (specified_shard_id) {
+        ret = log->list_entries(shard_id, start_time.to_real_time(), end_time.to_real_time(), max_entries - count, entries, marker, NULL, &truncated);
+      } else {
+        ret = log->list_entries(start_time.to_real_time(), end_time.to_real_time(), max_entries - count, entries, log_marker, &truncated);
+      }
       if (ret < 0) {
         cerr << "ERROR: list_bi_log_entries(): " << cpp_strerror(-ret) << std::endl;
         return -ret;