#include "include/str_list.h"
#include "include/rados/librados.hpp"
#include "cls_rgw_ops.h"
+#include "cls_rgw_const.h"
#include "common/RefCountedObj.h"
#include "include/compat.h"
#include "common/ceph_time.h"
}
return 0;
}
+
+ // trim the '<shard-id>#' prefix from a single shard marker if present
+ static std::string get_shard_marker(const std::string& marker) {
+ auto p = marker.find(KEY_VALUE_SEPARATOR);
+ if (p == marker.npos) {
+ return marker;
+ }
+ return marker.substr(p + 1);
+ }
};
/* bucket index */
string& read_iter, map<rgw_user_bucket, rgw_usage_log_entry>& usage,
bool *is_truncated);
-void cls_rgw_usage_log_trim(librados::ObjectWriteOperation& op, string& user,
+int cls_rgw_usage_log_trim(librados::IoCtx& io_ctx, const string& oid, string& user,
uint64_t start_epoch, uint64_t end_epoch);
void cls_rgw_usage_log_add(librados::ObjectWriteOperation& op, rgw_usage_log_info& info);