From: Tianshan Qu Date: Wed, 28 Feb 2018 17:32:32 +0000 (+0800) Subject: rgw: datalog list support --shard-id and --marker X-Git-Tag: v13.0.2~47^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14895ee13c24f8c6378d0ba5a4fa717cd8555f04;p=ceph.git rgw: datalog list support --shard-id and --marker Signed-off-by: Tianshan Qu --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index d7c43cc06623..53b77f3723ac 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -6913,11 +6913,15 @@ next: return -ret; RGWDataChangesLog *log = store->data_log; - RGWDataChangesLog::LogMarker marker; + RGWDataChangesLog::LogMarker log_marker; do { list 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;