mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
rgw: VersionIdMarker and NextVersionIdMarker should be returned when listing
object versions if necessary. Fixes: http://tracker.ceph.com/issues/19886 Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
This commit is contained in:
parent
69de7bc3a2
commit
f805c3e089
@ -1983,7 +1983,7 @@ void RGWListBucket::execute()
|
||||
list_op.params.list_versions = list_versions;
|
||||
|
||||
op_ret = list_op.list_objects(max, &objs, &common_prefixes, &is_truncated);
|
||||
if (op_ret >= 0 && !delimiter.empty()) {
|
||||
if (op_ret >= 0) {
|
||||
next_marker = list_op.get_next_marker();
|
||||
}
|
||||
}
|
||||
|
@ -539,8 +539,11 @@ void RGWListBucket_ObjStore_S3::send_versioned_response()
|
||||
s->formatter->dump_string("Name", s->bucket_name);
|
||||
s->formatter->dump_string("Prefix", prefix);
|
||||
s->formatter->dump_string("KeyMarker", marker.name);
|
||||
if (is_truncated && !next_marker.empty())
|
||||
s->formatter->dump_string("VersionIdMarker", marker.instance);
|
||||
if (is_truncated && !next_marker.empty()) {
|
||||
s->formatter->dump_string("NextKeyMarker", next_marker.name);
|
||||
s->formatter->dump_string("NextVersionIdMarker", next_marker.instance);
|
||||
}
|
||||
s->formatter->dump_int("MaxKeys", max);
|
||||
if (!delimiter.empty())
|
||||
s->formatter->dump_string("Delimiter", delimiter);
|
||||
|
Loading…
Reference in New Issue
Block a user