list_op.params.prefix = prefix;
list_op.params.delim = delimiter;
list_op.params.marker = marker;
+ list_op.params.end_marker = end_marker;
list_op.params.list_versions = list_versions;
ret = list_op.list_objects(max, &objs, &common_prefixes, &is_truncated);
* Any skipped results will have the matching portion of their name
* inserted in common_prefixes with a "true" mark.
* marker: if filled in, begin the listing with this object.
+ * end_marker: if filled in, end the listing with this object.
* result: the objects are put in here.
* common_prefixes: if delim is filled in, any matching prefixes are placed
* here.
}
result->clear();
- rgw_obj marker_obj, prefix_obj;
+ rgw_obj marker_obj, end_marker_obj, prefix_obj;
marker_obj.set_instance(params.marker.instance);
marker_obj.set_ns(params.ns);
marker_obj.set_obj(params.marker.name);
rgw_obj_key cur_marker;
marker_obj.get_index_key(&cur_marker);
+ end_marker_obj.set_instance(params.end_marker.instance);
+ end_marker_obj.set_ns(params.ns);
+ end_marker_obj.set_obj(params.end_marker.name);
+ rgw_obj_key cur_end_marker;
+ end_marker_obj.get_index_key(&cur_end_marker);
+ const bool cur_end_marker_valid = !cur_end_marker.empty();
+
prefix_obj.set_ns(params.ns);
prefix_obj.set_obj(params.prefix);
string cur_prefix = prefix_obj.get_index_key_name();
continue;
}
+ if (cur_end_marker_valid && cur_end_marker <= obj) {
+ truncated = false;
+ goto done;
+ }
+
if (count < max) {
params.marker = obj;
next_marker = obj;